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
Livid
V2EX  ›  Python

sh

  •  
  •   Livid · 2013-11-26 09:04:01 +08:00 · 4031 次点击
    这是一个创建于 3805 天前的主题,其中的信息可能已经有所发展或是发生改变。
    将任意 cli 程序变成类似 Python 函数的使用方式:

    http://amoffat.github.io/sh/
    10 条回复    1970-01-01 08:00:00 +08:00
    senghoo
        1
    senghoo  
       2013-11-26 09:08:10 +08:00
    直接system不好么。。
    要是做了stdout的解析还有用点。。
    sophy
        2
    sophy  
       2013-11-26 09:13:24 +08:00
    命令一多这个东西就很有用哇
    L42y
        3
    L42y  
       2013-11-26 09:55:17 +08:00   ❤️ 1
    似乎和这个重复了 http://www.v2ex.com/t/47892
    hit9
        5
    hit9  
       2013-11-26 12:03:42 +08:00
    但是我会很少用这个库。虽然它看起来很漂亮、、一般还是subprocess.call
    zhttty
        6
    zhttty  
       2013-11-26 15:36:39 +08:00 via Android
    @L42y 快把三楼删了…
    efi
        7
    efi  
       2013-11-26 16:04:33 +08:00
    似乎和这个重复了 http://www.v2ex.com/t/47892
    efi
        8
    efi  
       2013-11-26 16:04:47 +08:00
    似乎和这个重复了: http://www.v2ex.com/t/47892
    ushuz
        9
    ushuz  
       2013-11-26 16:49:31 +08:00
    @efi 似乎和3楼重复了
    est
        10
    est  
       2013-11-26 17:10:14 +08:00
    当年也幻想个从 cli 程序man page自动生成 gui 的东西。最后发现还是 cli 来得快。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2870 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:44 · PVG 17:44 · LAX 02:44 · JFK 05:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.