Running External Programs from Within Python
Dirk Hagemann
usenet at mail-2-me.com
Sat Jan 31 15:20:15 EST 2004
Bob=Moore wrote:
> 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
Hi Bob!
That is very easy: popen()
Check the FAQ and documentation again for popen.
Regards
Dirk
More information about the Python-list
mailing list