Currently the 'commands' module is provided with python on Win32 systems, but does not function properly. (The library reference says it is only available on Unix). The commands module provides 3 functions: getoutput(cmd) returns output generated by executing 'cmd' in a shell getstatusoutput(cmd) returns (status,output) generated by executing 'cmd' in a shell getstatus(file) returns output of "ls -ld file" Below is a simple patch which enables 'getoutput' and 'getstatusoutut' to work properly on Win32. Since 'getstatusfile' only makes sense on Unix, the patch prevents it from being defined on Win32. The current behavior is maintained on all other platforms.
Logged In: YES user_id=21627 Can you please resubmit this as a unified diff? Also, please make sure you don't incude white-space only changes: Your patch says that it changes all lines, just because you add a CR at the end of every line (so either convert the modified file to Unix conventions, or the original file to Windows conventions).
Logged In: YES user_id=469548 The commands module is going to stay Unix-specific. There are too many potential issues with trying to support the various win32 command interpreters. See http://mail.python.org/pipermail/python-dev/2004-August/047774.html and its responses.