尝试打开txt时出现此错误。文件。请告诉如何解决它。打开子进程python时发生错误
code: subprocess.Popen("/home/yash/Documents/ct.txt")
time.sleep(1)
error:
Traceback (most recent call last):
File "/home/yash/Documents/final_downloader22.py", line 5, in <module>
subprocess.Popen("/home/yash/Documents/ct.txt")
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
感谢您的回复,我正在运行linux,我想用gedit打开它来编辑任何进一步的帮助。 – user1779646
@ user1779646然后调用'gedit'并告诉它加载txt文件:'subprocess.Popen(['gedit',“/home/yash/Documents/ct.txt”])''。 – glglgl
它的工作,谢谢。 – user1779646