Running External Programs from Within Python

David Dürrenmatt dd at guv.ethz.ch
Sat Jan 31 16:47:47 EST 2004


On 31 Jan 2004 11:23:42 -0800, Bob=Moore <bobmoore at pobox.com> wrote:

> Can I run (call? exec? eval?) an external program from inside a Python
> program?

Try this:

import os
os.system('notepad.exe')  # starts notepad

For complex interaction, use win32pipe (Win32 Extensions).


dave





More information about the Python-list mailing list