Re: [Tutor] command lines

2007-05-08 Thread Alan Gauld

Rikard Bosnjakovic [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 On 5/6/07, Jason Coggins [EMAIL PROTECTED] wrote:

 Is there a way to send a command to the Linux Terminal
 from inside a Python program?

To be picky you don't send the command to the Terminal
but to the OS. But the output will appear in the terminal which
is what I assume you mean... :-)

 os.system(), os.popen(), etc.

Also the commands module or the more recent
subprocess module which is intended to replace
all of the previous mechanisms eventually.

See my OS topic in my tutor for examples of all of these.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] command lines

2007-05-06 Thread Jason Coggins
Is there a way to send a command to the Linux Terminal from inside a Python 
program?

Jason___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] command lines

2007-05-06 Thread Rikard Bosnjakovic
On 5/6/07, Jason Coggins [EMAIL PROTECTED] wrote:

 Is there a way to send a command to the Linux Terminal from inside a Python
 program?

os.system(), os.popen(), etc.

-- 
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor