如何在Python Shell中执行一 Shell命令,pythonshell,如何在Python Sh
如何在Python Shell中执行一 Shell命令,pythonshell,如何在Python Sh
如何在Python Shell中执行一 Shell命令, 举个例子:
使用 Flask-Script 在命令行中执行 python manger.py startcelery
其中 startcelery 是想在 bash 中运行 celery -A celeryd worker -P eventlet -c 1000 -l info 命令。
那么,如何持续获得这条命令的输出内容并显示在 shell 中呢?
附:以上只是举个例子。不要说为什么不直接在 shell 中执行,我只是想把日常开发中所有的行为都放在 manger.py 中集中管理。另外,我也知道可以用 Fabric 完成。。。。可,Py3k ~(>_<)~
编橙之家文章,
相关内容
- Python科学计算:一般是怎么处理,python科学计算处理
- pylint使用sqlalchemy模块报错是E1120,sqlalchemye1120,pylint使用
- Flask框架怎么来将jsonify返回的json字符串能是中文的?,
- Flask and wsgi, 出现导入报错ImportError: 信息是 cannot impor
- 拍拍贷会采用Python吗,这样的网站需要什么技术,拍拍
- Tornado加上sqlalchemy在SAE上出现错误,tornadosqlalchemy,Torn
- pytesser怎么样识别彩色图片,,linux上装了一天终于
- python db.session.commit()的时候出现FlushError错误,,python d
- 七牛下载链接出现{"error":"download token auth failed"
- 相同硬件不同编程语言,它们的区别是什么呢?,硬件
评论关闭