[ python-Feature Requests-1713624 ] commands module

SourceForge.net noreply at sourceforge.net
Sun May 6 04:11:23 CEST 2007


Feature Requests item #1713624, was opened at 2007-05-05 22:11
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1713624&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Joseph Armbruster (joearmbruster)
Assigned to: Nobody/Anonymous (nobody)
Summary: commands module

Initial Comment:
In reference to the commands module, and it's simple self   :-)

Current comments in the module state the following:

# Module 'commands'
#
# Various tools for executing commands and looking at their output and status.
#
# NB This only works (and is only relevant) for UNIX.

Ultimately, I would like to see the following:

1) This comment removed:
# NB This only works (and is only relevant) for UNIX.

1) A change to getstatusoutput along these lines:
    if os.name == 'nt':
        pipe = os.popen(cmd + ' 2>&1','r')
    else:
        pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')

* I was going to suggest having a more pythonic getstatus method, that would act reasonably similar across platforms (maybe using some combination of os.listdir and os.stat or something), however, it is being deprecated, so onward!

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

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


More information about the Python-bugs-list mailing list