Re: [Tutor] python 2.3.4, how to use os.system and collect it's output to a file.

2011-08-02 Thread xDog Walker
On Tuesday 2011 August 02 08:40, Thirupathaiah Gande (tgande) wrote: > Hi, > > > > I have Python 2.3.4. > > I want to use os.system command and collect a command's output to a > file. But it is not collecting all the output. It is truncating.. > > > > Code is as below. > > > > cmd = "%s rl -comp %

Re: [Tutor] python 2.3.4, how to use os.system and collect it's output to a file.

2011-08-02 Thread Alan Gauld
On 02/08/11 16:40, Thirupathaiah Gande (tgande) wrote: I want to use os.system command and collect a command’s output to a file. But it is not collecting all the output. It is truncating.. no its not truncating anything, it is returning the exit code of the command, because thats what os.syst

Re: [Tutor] python 2.3.4, how to use os.system and collect it's output to a file.

2011-08-02 Thread Timo
On 02-08-11 17:40, Thirupathaiah Gande (tgande) wrote: Hi, I have Python 2.3.4. Is there some reason for this? You probably should update to 2.7 if possible. Then have a look at the Subprocess module documentation. There are some examples which should get you on the way. Cheers, Timo I

[Tutor] python 2.3.4, how to use os.system and collect it's output to a file.

2011-08-02 Thread Thirupathaiah Gande (tgande)
Hi, I have Python 2.3.4. I want to use os.system command and collect a command's output to a file. But it is not collecting all the output. It is truncating.. Code is as below. cmd = "%s rl -comp %s@%s/%d >> %s" % (C_CMD, i, branch, x, temp_acme_rl_log) cmd_res = os.system( cmd )