Re: subprocess.Popen()/call() and appending file

2010-06-15 Thread hiral
On Jun 14, 7:11 pm, Kushal Kumaran wrote: > On Mon, Jun 14, 2010 at 7:01 PM,hiral wrote: > > Hi, > > > Do we have any facility to append file from Popen()/call(); see below > > example... > > > 1 import subprocess > > 2 f=open('log', 'w') > > 3 ...# writing some log-into into log file > > 4 p = su

Re: subprocess.Popen()/call() and appending file

2010-06-14 Thread Kushal Kumaran
On Mon, Jun 14, 2010 at 7:01 PM, hiral wrote: > Hi, > > Do we have any facility to append file from Popen()/call(); see below > example... > > 1 import subprocess > 2 f=open('log', 'w') > 3 ...# writing some log-into into log file > 4 p = subprocess.Popen(cmd, stdout=f, stderr=f) # (Q) > 5 ...# do

subprocess.Popen()/call() and appending file

2010-06-14 Thread hiral
Hi, Do we have any facility to append file from Popen()/call(); see below example... 1 import subprocess 2 f=open('log', 'w') 3 ...# writing some log-into into log file 4 p = subprocess.Popen(cmd, stdout=f, stderr=f) # (Q) 5 ...# do remaining stuff Q: At line# 4, the output of the 'cmd' will wip

subprocess.Popen()/call() and appending file

2010-06-14 Thread hiral
Hi, Do we have any facility to append file from Popen()/call(); see below example... 1 import subprocess 2 f=open('log', 'w') 3 ...# writing some log-into into log file 4 p = subprocess.Popen(cmd, stdout=f, stderr=f) # (Q) 5 ...# do remaining stuff Q: At line# 4, the output of the 'cmd' will wip

Re: appending file

2007-06-29 Thread Falcolas
On Jun 29, 1:04 pm, Kuo <[EMAIL PROTECTED]> wrote: > # FPGA CLOCK^M > NET "SYSCLK_A" loc = N16 | TNM_NET = SYSCLK_A;^M > NET "SYSCLK_AN" loc = M16 | TNM_NET = SYSCLK_A;^M I see those bloody ^M's anytime I have to deal with a DOS file (since it's the carrage return \r character). Is 'pin' a DOS

Re: appending file

2007-06-29 Thread Thomas Jollans
On Friday 29 June 2007, Kuo wrote: > Hi, > I'm trying to read a file (fileA) and append to another file(fileB). > However, I always get "^M" at the end. Does anyone know why ? Here is my > code ? I can't help you on your problem, but > ucf.close; > pin.close; these statements don't do anything.

Re: appending file

2007-06-29 Thread Bruno Desthuilliers
Kuo a écrit : > Hi, > I'm trying to read a file (fileA) and append to another file(fileB). > However, I always get "^M" at the end. Does anyone know why ? Here is my > code ? > > os.system("../syn/pin_assign.pl customer_netlist.txt") > shutil.copy("../fileB", "fileB") > ucf = open("fileB", "a")

appending file

2007-06-29 Thread Kuo
Hi, I'm trying to read a file (fileA) and append to another file(fileB). However, I always get "^M" at the end. Does anyone know why ? Here is my code ? os.system("../syn/pin_assign.pl customer_netlist.txt") shutil.copy("../fileB", "fileB") ucf = open("fileB", "a") pin = open("fileA", "r") ucf.w