[Tutor] Correct way to call an outside program?
alan.gauld at btinternet.com
Thu Mar 13 05:57:46 CET 2008
"Allen Fowler" <allen.fowler at yahoo.com> wrote
> I need to call an external command line .exe utility from my Python
> What is the best way to capture the output (if any) and (optionally)
> direct it to my normal standard output?
> There seem to be many options...
Historically there have been lots of methods introduced howeever
the most recent and officially correct way is now tyo use the
subprocess module. There are examples on the web pages
to show what you want.
Or read the Using the OS topic in my tutorial for the basics.
Author of the Learn to Program web site
More information about the Tutor