Interfacing with the command line

Terry Hancock hancock at anansispaceworks.com
Wed Mar 8 20:13:06 EST 2006


On Wednesday 08 March 2006 09:35 am, Byte wrote:
> I know its possible to acsess Python via the command line, but can I do
> the opposite and acsess the command line via Python? For example, can I
> write a script that will enter
> 
> $ firefox
> 
> on the command line, opening Firefox for me?

You have several options, depending on how you want
to communicate with it, and what version of Python
you are using. Keywords:

os.system
popen
subprocess

Search the Library Reference.

Cheers,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com



More information about the Python-list mailing list