Re: file write question

2008-01-28 Thread Robb Lane (SL name)
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

Re: file write question

2008-01-27 Thread thebjorn
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

Re: file write question

2008-01-26 Thread Hrvoje Niksic
"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

file write question

2008-01-26 Thread Robb Lane (SL name)
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