Re: shlex, unicode, and subprocess.Popen on Windows

2010-08-30 Thread Nobody
On Mon, 30 Aug 2010 10:24:26 -0400, python wrote: >> Kudos for avoiding shell=True > > My understanding is that the only time one needs to use shell=True is > when they are 'executing' a non-executable file whose executable must be > discovered via file association rules? Does that sound accurate

Re: shlex, unicode, and subprocess.Popen on Windows

2010-08-30 Thread Tim Golden
On 30/08/2010 3:24 PM, pyt...@bdurham.com wrote: My understanding is that the only time one needs to use shell=True is when they are 'executing' a non-executable file whose executable must be discovered via file association rules? Does that sound accurate? I'm not entirely sure what you mean by

Re: shlex, unicode, and subprocess.Popen on Windows

2010-08-30 Thread python
Hi Chris, > It's a bug: http://bugs.python.org/issue1170 Thanks for pointing out the shlex bug. My concern was that shlex had Windows specific Unicode limitations because of the way the Windows shell so poorly supports unicode output. > Kudos for avoiding shell=True My understanding is that the

Re: shlex, unicode, and subprocess.Popen on Windows

2010-08-30 Thread Chris Rebert
On Mon, Aug 30, 2010 at 6:54 AM, wrote: > Python 2.6/Windows: shlex.split() does not support unicode strings. Is this > simply a limitation of the current shlex implementation or is this an > intentional design decision that reflects the behavior of how the Windows > shell supports unicode values

shlex, unicode, and subprocess.Popen on Windows

2010-08-30 Thread python
Python 2.6/Windows: shlex.split() does not support unicode strings. Is this simply a limitation of the current shlex implementation or is this an intentional design decision that reflects the behavior of how the Windows shell supports unicode values? Specifically, it doesn't appear that subprocess

Re: subprocess.Popen on Windows

2008-10-21 Thread Werner F. Bruhin
Werner F. Bruhin wrote: I am trying to use subprocess - it basically works but. command = 'ping ' + '-n '+ str(count) + ' -l ' + str(size) + ' ' + str(node) print command p = subprocess.Popen(command, stdin=subprocess.PIPE,

Re: subprocess.Popen on Windows

2008-10-20 Thread Eric Carlson
Werner F. Bruhin wrote: I am trying to use subprocess - it basically works but. command = 'ping ' + '-n '+ str(count) + ' -l ' + str(size) + ' ' + str(node) print command p = subprocess.Popen(command, stdin=subprocess.PIPE,

subprocess.Popen on Windows

2008-10-20 Thread Werner F. Bruhin
I am trying to use subprocess - it basically works but. command = 'ping ' + '-n '+ str(count) + ' -l ' + str(size) + ' ' + str(node) print command p = subprocess.Popen(command, stdin=subprocess.PIPE,

Re: Problem using subprocess.Popen on windows

2007-10-07 Thread Nicholas Bastin
On 10/7/07, jorma kala <[EMAIL PROTECTED]> wrote: > from subprocess import * > > p1 = Popen(["dir"], stdout=PIPE) > output = p1.communicate()[0] > > > But I get a WindowsError : [Error 2] File Not Found Tim answered your actual question, but why are you doing this in the first place? The Py

Re: Problem using subprocess.Popen on windows

2007-10-07 Thread Tim Golden
jorma kala wrote: > I get an error that I don't understand when using the subprocess module > on Windows. > I guess I'm missing out something very basic. > For instance, to execute and capture the output of the ms-dos dir > command, I tried the following: > > from subprocess import * > > p1 = P

Problem using subprocess.Popen on windows

2007-10-07 Thread jorma kala
Hi, I get an error that I don't understand when using the subprocess module on Windows. I guess I'm missing out something very basic. For instance, to execute and capture the output of the ms-dos dir command, I tried the following: from subprocess import * p1 = Popen(["dir"], stdout=PIPE) outp

Re: subprocess.Popen on Windows

2006-06-25 Thread Uri Nix
Hi, Been there - try looking at: http://groups.google.com/group/comp.lang.python/browse_frm/thread/f2cb83e948326ff5/d69feabbfc940b01?q=uri.nix&rnum=2#d69feabbfc940b01 Cheers, Uri -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen on Windows

2006-06-24 Thread mmamsch
On 23.06.2006 23:12:02, "3c273" wrote: >"madpython" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> playing with subprocess.Popen on Windows I stumbled into the following >> problem: >> Python 2.4.3 (#69, Mar 29 2006, 17:35:34) >

Re: subprocess.Popen on Windows

2006-06-23 Thread 3c273
"madpython" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > playing with subprocess.Popen on Windows I stumbled into the following > problem: > Python 2.4.3 (#69, Mar 29 2006, 17:35:34) > > IDLE 1.1.3 > > >>> import subprocess >

subprocess.Popen on Windows

2006-06-23 Thread madpython
playing with subprocess.Popen on Windows I stumbled into the following problem: Python 2.4.3 (#69, Mar 29 2006, 17:35:34) IDLE 1.1.3 >>> import subprocess >>> p1=subprocess.Popen("c:\\asd.bat") #works OK >>> p2=subprocess.Popen("c:\\asd.bat",stdou