import subprocess
s = 'vlc "C:\\Documents and Settings\\bk\\Documents\\Resources\\WORKINPR2001.mpeg" :sout=\#duplicate{dst=display,dst=std{access=udp,mux=ts,dst=224.0.0.0:1234 }} :sout=#duplicate{dst=display,dst=std{access=udp,mux=ts,dst=224.0.0.0:1234}}'
print s
process = subprocess.Popen([s], shell=True)
I am using a file chooser dialog in my real program, but this causes the exact same problem.
When VideoLAN player opens it gives this message:
Unable to open '"C:\Documents'
Unable to open 'and'
Unable to open 'Settings\bk\Documents\Resources\WORKINPR2001.mpeg"'
However when I print the string I get
vlc "C:\Documents and Settings\bk\Documents\Resources\WORKINPR2001.mpeg" :sout=\#duplicate{dst=display,dst=std{access=udp,mux=ts,dst=224.0.0.0:1234}} :sout=#duplicate{dst=display,dst=std{access=udp,mux=ts,dst= 224.0.0.0:1234}}
Which works fine when I paste it on a command line.
Is there something I am missing about spaces in the path on windows?
(BTW if I use
f=os.popen(s, 'w')
It works fine, but that leaves me with a blocking call, and I really want a subprocess)
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32