
2 liaa OP |
3 binux 2014-06-21 22:54:31 +08:00 #!/usr/bin/env python 然后将这个文件拷贝或者软连接到 /usr/local/bin/ 下,改名为 greet |
4 tongle 2014-06-21 22:57:48 +08:00 在/user/bin下做个链接到greet.py就可以了 |
6 timonwong 2014-06-22 00:17:58 +08:00 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', ], } ) |