Running External Programs from Within Python

Bob=Moore bobmoore at pobox.com
Sat Jan 31 14:23:42 EST 2004


I'm considering making the transfer from Rexx to Python as a scripting
language, but there's one thing I can do in Rexx that I can't seem to
do in Python: run an external program.
 
Suppose I have a Tkinter GUI and I want to just push a button and run
the Windows utility notepad.exe.  Or push another button and run one
of my old Rexx programs.
 
Basically I want to send a command line to Python and have it run that
command line as if I'm sending it to the Windows command-prompt, an
MS-DOS window, or clicking on an appropriate program icon.
 
Can I run (call? exec? eval?) an external program from inside a Python
program?

I have checked the FAQ and documentation.
 
Thanx,
 
Bob=Moore



More information about the Python-list mailing list