On 30/06/13 15:04, Matt D wrote:
that sounds ideal, but i have not found a way to pass the user selected file into the loop that writes the data without opening another file.
Don;t pass the file pass the fgile *name* Then inside the update method open the file(in append mode) and write the latest update then close the file again. (Or use the 'with' paradigm which closes the file for you) Repeat as needed. Part of the propblem is that you are openming the file right at the beginning and trying to pass the open file object around. Pass the filename and open when needed. Its slightly more resource intensive but a lot simpler.
how would i use shutil to copy the tempory self.logfile into the user selected file in this open fileFile()?:
The way to go is to only have one file and avoid all the copying stuff completely. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor