Re: newb: SENDING os.system(encod e_cmd) output to a loggingfile
At Monday 11/12/2006 20:47, johnny wrote:
>How do I pipe the output, generated from os.system(some_ command), to
>the logging file?
Use the subprocess module to run the command instead.
--
Gabriel Genellina
Softlab SRL
_______________ _______________ _______________ _____
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
Re: newb: SENDING os.system(encod e_cmd) output to a logging file
I am doing the os.system(encod e_cmd) within a thread. So you are
saying, have each thread create a subprocess module. Did you mean,
"Popen" (os.popen)?
Like os.popen(encode _cmd) , not os.system(encod e_cmd)?
Gabriel Genellina wrote:
At Monday 11/12/2006 20:47, johnny wrote:
>
How do I pipe the output, generated from os.system(some_ command), to
the logging file?
>
Use the subprocess module to run the command instead.
>
>
--
Gabriel Genellina
Softlab SRL
>
_______________ _______________ _______________ _____
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
Re: newb: SENDING os.system(encod e_cmd) output to a loggingfile
At Monday 11/12/2006 23:49, johnny wrote:
>Gabriel Genellina wrote:
At Monday 11/12/2006 20:47, johnny wrote:
>How do I pipe the output, generated from os.system(some_ command), to
>the logging file?
Use the subprocess module to run the command instead.
>
>I am doing the os.system(encod e_cmd) within a thread. So you are
>saying, have each thread create a subprocess module. Did you mean,
>"Popen" (os.popen)?
>
>Like os.popen(encode _cmd) , not os.system(encod e_cmd)?
No, I mean the module called "subprocess " contained in the standard
Python library since version 2.4:
Source code: Lib/subprocess.py The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace seve...
--
Gabriel Genellina
Softlab SRL
_______________ _______________ _______________ _____
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
Comment