appending file
- From: Kuo <chinchia.kuo@xxxxxxxxxxxxx>
- Date: Fri, 29 Jun 2007 19:04:28 GMT
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.write(pin.read())
ucf.close;
pin.close;
sys.exit(0);
Here is what I get.
# FPGA CLOCK^M
NET "SYSCLK_A" loc = N16 | TNM_NET = SYSCLK_A;^M
NET "SYSCLK_AN" loc = M16 | TNM_NET = SYSCLK_A;^M
Note that if I don't do "ucf.write(pin.read())", everything is ok.
Thanks for any help.
.
- Follow-Ups:
- Re: appending file
- From: Bruno Desthuilliers
- Re: appending file
- From: Falcolas
- Re: appending file
- From: Thomas Jollans
- Re: appending file
- Prev by Date: Re: Rappresenting infinite
- Next by Date: Re: Voluntary Abstract Base Classes
- Previous by thread: Voluntary Abstract Base Classes
- Next by thread: Re: appending file
- Index(es):