Running External Programs from Within Python

From: Bob=Moore (bobmoore_at_pobox.com)
Date: 01/31/04


Date: 31 Jan 2004 11:23:42 -0800

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


Quantcast