V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
whx20202
V2EX  ›  Python

python 除了 sys.argv 和 getopt 还有没有什么好用的 从命令行提取参数的库?

  •  
  •   whx20202 · 2016-12-19 15:01:21 +08:00 · 2375 次点击
    这是一个创建于 2691 天前的主题,其中的信息可能已经有所发展或是发生改变。
    7 条回复    2016-12-27 09:58:04 +08:00
    mulog
        1
    mulog  
       2016-12-19 15:03:48 +08:00
    jackyspy
        2
    jackyspy  
       2016-12-19 15:10:43 +08:00
    argparse
    docopt
    keysona
        3
    keysona  
       2016-12-19 15:13:22 +08:00
    同推 click 。

    非常 awesome 的一个库。
    whx20202
        4
    whx20202  
    OP
       2016-12-19 16:26:21 +08:00
    感谢以上三位 一会去试试
    @keysona
    @jackyspy
    @mulog
    ansheng
        5
    ansheng  
       2016-12-19 19:11:25 +08:00
    同求,楼主能否整理一份文档。
    raphaelsoul
        6
    raphaelsoul  
       2016-12-27 09:30:18 +08:00
    个人认为这个需求还是原生的写好,为了这一点点去引入一个库,感觉不值得
    whx20202
        7
    whx20202  
    OP
       2016-12-27 09:58:04 +08:00
    @ansheng click 有英文文档 相比其他库的英文文档非常简单
    而且也有好多人写了中文教程
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   767 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:43 · PVG 04:43 · LAX 13:43 · JFK 16:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.