Appending/inserting in outfile.write()
Doug Stanfield
DOUGS at oceanic.com
Mon Feb 28 16:19:30 EST 2000
More information about the Python-list mailing list
Mon Feb 28 16:19:30 EST 2000
- Previous message (by thread): Appending/inserting in outfile.write()
- Next message (by thread): [ANC] Template for CGI scripts ond others
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
A simple text file may not be the best choice for persistant storage in your case. Look at the shelve module for one alternative. -Doug- > -----Original Message----- > From: Will [mailto:wcohen at interpath.com] > Sent: Monday, February 28, 2000 10:46 AM > To: python-list at python.org > Subject: Appending/inserting in outfile.write() > > > I'm trying to write a CGI Python guestbook. Would there be a > way for me > to get the script to simply append, say 14 bytes from the end, to the > HTML guestbook file rather than completely overwriting it and holding > only one entry? I can use outfile.write to simply rewrite the entire > file. Do I need to use another function or just set a flag? > If I can't > insert text, can i just delete the last 14 bytes and rewrite the end > from there? > > Thanks, > Will > -- > http://www.python.org/mailman/listinfo/python-list >
- Previous message (by thread): Appending/inserting in outfile.write()
- Next message (by thread): [ANC] Template for CGI scripts ond others
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list