[New-bugs-announce] [issue5808] Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows

Lawrence Allan Jones report at bugs.python.org
Tue Apr 21 17:49:34 CEST 2009


New submission from Lawrence Allan Jones <mrwizard82d1 at earthlink.net>:

When attempting to use the subprocess.getstatusoutput() function on
Windows, I noticed an unusual error message:
"'{' is not recognized as an internal or external command, 
operable program or batch file."

When the output contained this message, the status was always 256.

>From the interactive prompt, I performed the following:
Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> cmdline = 'dir'
>>> (status, output) = subprocess.getstatusoutput(cmdline)
>>> status
256
>>> output
"'{' is not recognized as an internal or external command,\noperable
program or
batch file."
>>>

I think this is an error (but it is possible I misunderstand the
documentation for the function :) .)

----------
messages: 86242
nosy: mrwizard82d1
severity: normal
status: open
title: Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5808>
_______________________________________


More information about the New-bugs-announce mailing list