subprocess.Popen Fehler
Verfasst: Mittwoch 20. Juli 2022, 10:16
Guten Tag zusammen
ich mache meine ersten Schritte mit Python und wollte damit ein Programm öffnen - da scheiterts aber schon bereits:
import subprocess
subprocess.Popen('C:\Windows\System32\notepad.exe')
Der Fehler:
================ RESTART: C:\Users\mwalter\Desktop\start_PAD.py ================
Traceback (most recent call last):
File "C:\Users\mwalter\Desktop\start_PAD.py", line 2, in <module>
subprocess.Popen('C:\Windows\System32\notepad.exe')
File "C:\Users\mwalter\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\mwalter\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
Wo liegt da das Problem?
ich mache meine ersten Schritte mit Python und wollte damit ein Programm öffnen - da scheiterts aber schon bereits:
import subprocess
subprocess.Popen('C:\Windows\System32\notepad.exe')
Der Fehler:
================ RESTART: C:\Users\mwalter\Desktop\start_PAD.py ================
Traceback (most recent call last):
File "C:\Users\mwalter\Desktop\start_PAD.py", line 2, in <module>
subprocess.Popen('C:\Windows\System32\notepad.exe')
File "C:\Users\mwalter\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\mwalter\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
Wo liegt da das Problem?