Re: Success with subprocess communicate on Windows?

2014-07-03 Thread Wolfgang Maier
On 07/03/2014 06:09 AM, Terry Reedy wrote: Yes, but what puzzled me is that running subprocess.check_output(r'pyflakes c:\programs\python34\lib') in the regular interpreter *does* produce output instead of the error message. My guess is that it fills up the pipe, so that check_output starts

Re: Success with subprocess communicate on Windows?

2014-07-03 Thread Wolfgang Maier
On 07/03/2014 10:03 AM, Wolfgang Maier wrote: On 07/03/2014 06:09 AM, Terry Reedy wrote: - what is happening to the stderr output when run in IDLE ? I guess it is caught and suppressed somewhere, but to add to your observations the check_output call doesn't hang on IDLE, but finishes eventually

Re: Success with subprocess communicate on Windows?

2014-07-02 Thread Terry Reedy
On 7/2/2014 12:33 AM, Tim Roberts wrote: Terry Reedy tjre...@udel.edu wrote: It does not work on Windows. As I reported on http://bugs.python.org/issue8631, msg222053, subprocess.check_output(pyflakes -h) works in the interpreter and Idle shell, while s.check_output(pyflakes

Re: Success with subprocess communicate on Windows?

2014-07-02 Thread Wolfgang Maier
On 02.07.2014 11:05, Terry Reedy wrote: On 7/2/2014 12:33 AM, Tim Roberts wrote: Terry Reedy tjre...@udel.edu wrote: You need to use s.check_output(pyflakes c:\\programs\\python34\\lib\\turtle.py) or s.check_output(rpyflakes c:\programs\python34\lib\turtle.py) Now I get Command

Re: Success with subprocess communicate on Windows?

2014-07-02 Thread Wolfgang Maier
On 02.07.2014 19:31, Wolfgang Maier wrote: I am not 100% sure whether that is the problem, but from what I gather from the subprocess module docs the args string is passed to the Windows CreateProcess function as a single string. To me this seems to imply that it is passed as the lpCommandLine

Re: Success with subprocess communicate on Windows?

2014-07-02 Thread Terry Reedy
On 7/2/2014 1:37 PM, Wolfgang Maier wrote: On 02.07.2014 19:31, Wolfgang Maier wrote: I am not 100% sure whether that is the problem, but from what I gather from the subprocess module docs the args string is passed to the Windows CreateProcess function as a single string. To me this seems to

Re: Success with subprocess communicate on Windows?

2014-07-02 Thread Wolfgang Maier
Terry Reedy tjreedy at udel.edu writes: On 7/2/2014 12:33 AM, Tim Roberts wrote: Terry Reedy tjreedy at udel.edu wrote: You need to use s.check_output(pyflakes c:\\programs\\python34\\lib\\turtle.py) or s.check_output(rpyflakes c:\programs\python34\lib\turtle.py) Now I

Re: Success with subprocess communicate on Windows?

2014-07-02 Thread Ethan Furman
On 07/02/2014 04:22 PM, Wolfgang Maier wrote: So, everything's just fine except that it may be more convenient to use Popen().communicate() to avoid raising the error in the first place :) Nice sleuthing! :) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Success with subprocess communicate on Windows?

2014-07-02 Thread Terry Reedy
On 7/2/2014 7:22 PM, Wolfgang Maier wrote: Finally found out what the problem is: When I'm running your command using the cmd console, I get this output: c:\python34\lib\turtle.py:571: local variable 'rgb' is assigned to but never used c:\python34\lib\turtle.py:2936: local variable 'a21' is

Re: Success with subprocess communicate on Windows?

2014-07-01 Thread Tim Roberts
Terry Reedy tjre...@udel.edu wrote: It does not work on Windows. As I reported on http://bugs.python.org/issue8631, msg222053, subprocess.check_output(pyflakes -h) works in the interpreter and Idle shell, while s.check_output(pyflakes c:\programs\python34\lib\turtle.py) gives bizarre output