[Tutor] Using command line tool with python script

Kent Johnson kent37 at tds.net
Mon Oct 5 18:59:50 CEST 2009

On Mon, Oct 5, 2009 at 10:22 AM, Oleg Oltar <oltarasenko at gmail.com> wrote:

> os.popen4("application -parameter1 -file temp.txt")
> I wonder if that possible to execute this script (called application)
> without writing the file with initial data to the hard disk?

If "application" can take its input from stdin then you can use the
subprocess module to launch it and pipe data to it. If "application"
requires a file for input then I think you have to write a file.


More information about the Tutor mailing list