我在写这个程序 def get_special_paths(dir):
detected_paths = []
paths = os.listdir(dir)
for path in paths:
if path == r'__\w+__':
detected_paths.append(path)
for element in de
当我运行从主我的代码,它运行完全正常,但是当我尝试建立主要为使用py2exe exe文件,它给这个错误: Traceback (most recent call last):
File "main.py", line 118, in <module>
menu.menu.Menu()
File "menu\menu.pyo", line 20, in __init__
我试图从文件中读取一行并使用该内容作为os.listdir方法 f = open('test.txt', "r+")
test = f.readlines()
contentlist = []
contentlist = os.listdir(test[0])
返回 "WindowsError: [Error 123] The filename, directory name, or v