[英]how to save a dictionary in python to a text file separated by white spaces
[英]How to open a file with Python with white spaces in the name?
我有没有空格就不能重命名的文件(工作文件)。 文件名是Evo PROG6001 FSJD0250240 E.PART
存储在变量file
。 如果我运行os.system('start ' "'" + file + "'")
它只能识别单词Evo
并返回Windows cannot find "Evo". Make sure you types the name correctly, and then try again
Windows cannot find "Evo". Make sure you types the name correctly, and then try again
。 os.system('start ' + file)
也会发生同样的事情。
有没有办法做到这一点?
我需要使用os.startfile()
并将其指向我之前存储的根目录。
os.startfile(new_folder + '\\\\' + file)
有效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.