[ python-Feature Requests-1713624 ] commands module

SourceForge.net noreply at sourceforge.net
Sun May 13 09:54:44 CEST 2007


Feature Requests item #1713624, was opened at 2007-05-06 02:11
Message generated for change (Comment added) made by gbrandl
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: Closed
>Resolution: Wont Fix
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!

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

>Comment By: Georg Brandl (gbrandl)
Date: 2007-05-13 07:54

Message:
Logged In: YES 
user_id=849994
Originator: NO

I agree.

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

Comment By: Josiah Carlson (josiahcarlson)
Date: 2007-05-06 06:46

Message:
Logged In: YES 
user_id=341410
Originator: NO

Recent discussions in one of the python development lists has basically
stated that the commands module will be deprecated in favor of being
replaced by equivalent platform independent versions based on subprocess,
which will be placed in the subprocess module.  As such, it is doubtful
that your request will be fulfilled.  Suggested close as 'wont fix'.

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

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