File processing
Bjorn Pettersen
BPettersen at NAREX.com
Tue Feb 18 11:50:39 EST 2003
More information about the Python-list mailing list
Tue Feb 18 11:50:39 EST 2003
- Previous message (by thread): File processing
- Next message (by thread): PEP 308: I liked the original proposal better
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> From: Peter Hansen [mailto:peter at engcorp.com] > > Bjorn Pettersen wrote: > > > > > From: fishers [mailto:m.e.l at btclick.com] > > > > > > Hi > > > > > > Can Python be used to do 'high-level' file processing. > > > for example, > > > appending one file to another? And if so, how? > > > > fp = open('file1', 'a') > > fp.write(open('file2', 'rb').read()) > > fp.close() > > Should use "ab" to open "file1" unless you want to expand \r\n > combinations in file2 to be \r\r\n when they are added to file1... Yes, thank you for spotting my brainfart :-) -- bjorn
- Previous message (by thread): File processing
- Next message (by thread): PEP 308: I liked the original proposal better
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list