[Patches] [ python-Patches-713428 ] Fixes for 'commands' module on win32

SourceForge.net noreply@sourceforge.net
Mon, 07 Apr 2003 23:02:25 -0700


Patches item #713428, was opened at 2003-04-01 19:51
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=713428&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gregory Warnes (warnes)
>Assigned to: Martin v. Löwis (loewis)
Summary: Fixes for 'commands' module on win32

Initial Comment:
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.





----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-04-08 08:02

Message:
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).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=713428&group_id=5470