#optparse

@sumanthvepa

argparse is maybe-okay for simple things, but I don't use it for pretty much anything anymore. Have you tried one of the other extant packages that provide higher-level, more-powerful option handling?

I use `click` extensively for complex multiple-command CLI tools.

#click #optparse #argparse #CLI

GripNewsGripNews
2023-07-30

🌗 Python有什麼新動向?GIL被移除,新編譯器,optparse被棄用...
➤ Python將移除GIL,LPython是一個新的Python編譯器,Pydantic 2變得更好用,getopt和optparse被軟棄用,Cython 3.0釋出,支援更好的純Python,PEP 722提出了單文件腳本的依賴規範。
bitecode.dev/p/whats-up-python
Python將移除GIL;LPython是一個新的Python編譯器;Pydantic 2變得更好用;PEP 387定義了"軟棄用",getopt和optparse被軟棄用;Cython 3.0釋出,支援更好的純Python;PEP 722提出了單文件腳本的依賴規範。
+ 這些新動向對Python開發者來說真是太棒了!特別是移除GIL和新的編譯器,這將帶來更好的性能和更多的選擇。
+ 我很期待Pydantic 2的使用,它的速度提升將對我的項目有很大的幫助。另外,PEP 722的提案

2020-12-06

#optparse is a #publicdomain dependencyless #getopt.

optparse is a command line option parser that functions in a similar manner to getopt. optparse does not use global state, allowing for subcommands and restarting of the parser in a reliable way. optparse provides both short and long option parsing, option permuting, and capturable errors.

Website 🔗️: github.com/skeeto/optparse

#free #opensource #foss #fossmendations #programming

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst