This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: commands module
Type: enhancement Stage:
Components: Windows Versions: Python 2.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, joearmbruster, josiahcarlson
Priority: normal Keywords:

Created on 2007-05-06 02:11 by joearmbruster, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg55101 - (view) Author: Joseph Armbruster (joearmbruster) Date: 2007-05-06 02:11
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!
msg55102 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2007-05-06 06:46
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'.
msg55103 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-05-13 07:54
I agree.
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 44933
2007-05-06 02:11:22joearmbrustercreate