appending file

Thomas Jollans thomas at jollans.com
Fri Jun 29 16:42:54 EDT 2007


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. You'll want

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.



-- 
      Regards,                       Thomas Jollans
GPG key: 0xF421434B may be found on various keyservers, eg pgp.mit.edu
Hacker key <http://hackerkey.com/>:
v4sw6+8Yhw4/5ln3pr5Ock2ma2u7Lw2Nl7Di2e2t3/4TMb6HOPTen5/6g5OPa1XsMr9p-7/-6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/python-list/attachments/20070629/33549120/attachment.sig>


More information about the Python-list mailing list