3
binux 2014 年 6 月 21 日 #!/usr/bin/env python
然后将这个文件拷贝或者软连接到 /usr/local/bin/ 下,改名为 greet |
4
tongle 2014 年 6 月 21 日
在/user/bin下做个链接到greet.py就可以了
|
6
timonwong 2014 年 6 月 22 日 The Hard Way (and cross platform, on windows, it will generated a launcher application named greet.exe):
# Requirements * setuptools * Define your main function, for example: def main() setup.py: from setuptools import setup setup( # other arguments here... py_modules=['greet.py'], entry_points={ 'console_scripts': [ 'greet = greet:main', ], } ) |