我在Linux中运行,我需要用python脚本打开另一个python脚本,在windows中,它就像os.startfile(dir)Tracebackrecent call last):
File "/home/dev/PycharmProjects/pythonProject/vpn.py", line 1, in <m
我想在Python3.5的默认应用程序中打开一个文件,特别是在记事本中的'screen.txt‘。
我已经在网上搜索过了,在大多数答案上都找到了os.startfile(path)。我用文件的路径os.startfile(C:\[directories n stuff]\screen.txt)尝试了一下,但是它返回了一个错误,说“意外的字符后接一行连续字符”。编辑:我在一台受限的(学校)计算机上使用Windows7。