A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/324505.html below:

calling command line programs?

calling command line programs? calling command line programs?chriss chriss at streiff.org
Sat Sep 10 17:49:49 EDT 2005
Grant Edwards wrote:

> On 2005-09-11, Yevgeniy (Eugene) Medynskiy <ym66 at cornell.edu> wrote:
> 
>> This is probably a very newbie question, but after searching
>> google and docs @ python.org I can't find an answer, so maybe
>> someone would be able to help?
>>
>> I'd like to call command-line functions from my python script
>> (like you would in perl using backticks)... Is there a way of
>> doing this? And if so, how does the environment get treated (I
>> have some variables in my env that the programs I'd be calling
>> need to see).
> 
> Take a look at os.popen, os.spawn, or the popen2, and
> subprocess modules.
> 
> That last one seems to be gaining popularity.
> 

The suggested modules and functions have been deprecated according to the
python 2.4 docs. The doc suggests to use the functions in the 'subprocess'
module.

chriss

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4