未知
shelldon的Python项目详细描述
==
>目录
---------[简介]
-[简介]
-[安装]
-[用法]
>
==
=
=
====
=
=
-[许可证]
=
=-[支持]
-[支持]
==-[安装]
-[使用]
-[使用]
-[使用]
-[许可证]
-[许可证]
简介<;a name=”简介”>;<;/a>;
bash的python包装器?你知道你有时想如何从python中生成一些shell命令吗?然后选择:
``python
import subprocess
还有,为什么要把它做成一个列表呢?
为什么我们不能写“subprocess.call('git add--all')”
安装<;a name='install'>;<;/a>;
----------
只需安装raw shelldon.py。然后,将其添加到python路径中,如下所示:
``shell
export python path=$pythonpath:/~/path/to/the/shelldon.py
`````
>>
>通过打开python shell来测试它。
`````
>;import shelldon
>;>;它可以工作!
```
usage<;a name=”usage”>;
——
——
**普通脚本使用:**
``python
import shelldon
**或者,如果要将多个命令捆绑在一起:**
``python
shelldon.call(“
git add--all
git commit-m‘initial commit’
git push origin master
```
**终端使用:**
``python
>;导入shelldon
>;shelldon.terminal()
~$>;ls
桌面程序
文档公开
下载
音乐
图片
~$>;CD桌面
~/desktop$>;退出;使用此命令退出shelldon的终端
>;打印“yay to using shell in python!”#回到python解释器
````
license<;a name=”license”>;<;/a>;
--------
以下代码在mit许可下发布。请参阅上面的内容。
support<;a name='support'>;
----------
如果您有任何问题,请随时与我联系。
我的电子邮件地址是guanhao3797@gmail.com
**将在项目更重要时更新自述文件。**