【发布时间】:2016-03-06 19:13:41
【问题描述】:
这是我的shell脚本,我想运行foo(param)的方法:
#!/bin/sh
python /Users/username/Desktop/forTrump/test.py
如何使用上面的 shell 脚本在 test.py 中运行函数?
【问题讨论】:
这是我的shell脚本,我想运行foo(param)的方法:
#!/bin/sh
python /Users/username/Desktop/forTrump/test.py
如何使用上面的 shell 脚本在 test.py 中运行函数?
【问题讨论】:
python -c 'import test; print test.foo(param)'
【讨论】: