【发布时间】:2025-12-08 06:40:01
【问题描述】:
命令行程序不能正常工作。
我编写 test.py 和 setup.py,并执行“python setup.py install”。
我运行“test.py”,结果编辑器打开 test.py。
test.py 不打印“test”。
我的环境是 Windows 上的 Python 2.7.6。
请指教。
setup.py
# coding: UTF-8
from distutils.core import setup
setup(
name = "test",
version = "0.1",
scripts = ['test.py']
)
test.py
# coding: UTF-8
print u"test"
【问题讨论】:
标签: python python-2.7