ich möchte unter Windows von einem Programm aus ein neues unabhänig von dem alten mit einem Parameter starten. Ich habe mal in os nachgeschaut und os.spawnv gefunden. Leider funktioniert es einfach nicht.
Code: Alles auswählen
import os
path='D:\\ordner1\\Editor.pyw'
file=u'D:\\ordner2\\wm-gruppenregeln.txt'
os.spawnv(os.P_NOWAIT,path,[file])
Code: Alles auswählen
Traceback (most recent call last):
File "D:\bwinf\2.runde\nr1\losgehts.pyw", line 228, in new
self.open()
File "D:\bwinf\2.runde\nr1\losgehts.pyw", line 243, in open
self.open_file(path)
File "D:\bwinf\2.runde\nr1\losgehts.pyw", line 257, in open_file
os.spawnv(os.P_WAIT,path,[file])
OSError: [Errno 8] Exec format error
Danke schon einmal im voraus
mfg
cime