Google "subprocess Popen parameters" or "subprocess Popen arguments"...the first few hits should explain.
B -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabriel Genellina Sent: Wednesday, October 18, 2006 3:02 PM To: Axiom X11 Cc: python-win32@python.org Subject: Re: [python-win32] Calling a subprocess with spaces in the path At Wednesday 18/10/2006 17:43, Axiom X11 wrote: >I am trying to run a command as a subprocess, and it keeps choking >on the spaces. > > >import subprocess > > >s = 'vlc "C:\\Documents and >Settings\\bk\\Documents\\Resources\\WORKINPR2001.mpeg" >:sout=\#duplicate{dst=display,dst=std{access=udp,mux=ts,dst=<http://224.0.0.0:1234>224.0.0.0:1234 > >}} >:sout=#duplicate{dst=display,dst=std{access=udp,mux=ts,dst=<http://224.0.0.0:1234>224.0.0.0:1234}}' >print s >process = subprocess.Popen([s], shell=True) Try omitting the shell=True argument. >Is there something I am missing about spaces in the path on windows? Yes, type cmd /? and see the rather crazy rules about quotes on the shell... >(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) This way you are not running your comand thru the shell. -- Gabriel Genellina Softlab SRL __________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32