setup.pypy2exe:WindowsError:[错误267]的目录名称无效
from distutils.core import setup
import py2exe
setup(console=['program.py'])
错误
Traceback (most recent call last):
File "program.py", line 427, in <module>
File "program.py", line 242, in __init__
WindowsError: [Error 267] The directory name is invalid: 'C:\\Users\\Bob\applications\\Program\\test\\v0.6\\dist\\library.zip/*.*'
目录名称是指一个压缩文件称为library
其位于dist文件夹中并在编译期间创建。
行240 - 246 program.py
file_list = []
root_dir = sys.path[0]
for path in os.listdir(root_dir):
full_path = os.path.join(root_dir, path).lower()
if os.path.isfile(full_path) and full_path.endswith('txt'):
# create list of (filename, dir) tuples
file_list.append((path.lower(), full_path))
program.py
gui = GuiTk(win)
任何想法是什么原因导致这个问题的427线?我使用Windows 7 64位和PortablePython 2.7.2.1来创建可执行文件。在编译过程中没有其他错误。
也许这是原因:“...... \\ library.zip/*.*” – Dhara