H -
I am not familiar with flush(), will look into it.
But an interesting note: I repeatedly and often start long running
processes (one running right now: on about it's 14th hour), writing to
open files, with few problems (on Mac OS X). Although of course I
can't look at the results until the file
On Jan 27, 4:02 am, "Robb Lane (SL name)" <[EMAIL PROTECTED]> wrote:
> I have written a script which:
> - opens a file
> - does what it needs to do, periodically writing to the file... for a
> few hours
> - then closes the file when it's done
> So my question is:
> Would it be better to 'open' and
"Robb Lane (SL name)" <[EMAIL PROTECTED]> writes:
> ... or just leave it till it's done?
> I don't need to use the file contents until the script is done
> (although it would be nice... just to check it while it's working),
Use flush() to force the contents out at opportune times without
closing
I have written a script which:
- opens a file
- does what it needs to do, periodically writing to the file... for a
few hours
- then closes the file when it's done
So my question is:
Would it be better to 'open' and 'close' my file on each write cycle?
e.g.
def writeStuff(content):
myFile = op