[Tutor] Need help appending data to a logfile
Matt D
md123 at nycap.rr.com
Fri Jun 28 13:27:36 CEST 2013
>
> As for the shutil.copy() function, how complex can it be? It takes two
> file names, source and destination. It does not need a with statement
> since it wants strings, not file handles.
>
> You might get into trouble on some OS's with the source file already
> open, but since you open it with append, it should be trivial to close
> and reopen it.
>
>
The problem here is that the, I am pretty sure that, using anything from
shutil overwrite what is currently in the 'dst' file. So if I am
starting and stopping the program, that file is going to lose
everything. There has to be a way around this.
More information about the Tutor
mailing list