Terry Reedy wrote:
[EMAIL PROTECTED] wrote:
...If I can sense that the file is being created in the first iteration,
I can then use an if statement to decide whether or not I need to
write the header. Question: how can I tell if the file is being
created or if this its the first iteration? ...
[EMAIL PROTECTED] wrote:
I have a simulation that runs many times with different parameters,
and I want to aggregate the output into a single file with one rub: I
want a header to be written only the first time. My program looks a
bit like this:
def main():
for param in range(10):
s
Sean Davis a écrit :
On Sep 23, 2:02 pm, [EMAIL PROTECTED] wrote:
I have a simulation that runs many times with different parameters,
and I want to aggregate the output into a single file with one rub: I
want a header to be written only the first time. My program looks a
bit like this:
def mai
On Sep 23, 7:02 pm, [EMAIL PROTECTED] wrote:
> I have a simulation that runs many times with different parameters,
> and I want to aggregate the output into a single file with one rub: I
> want a header to be written only the first time. My program looks a
> bit like this:
>
> def main():
> fo
On Sep 23, 2:02 pm, [EMAIL PROTECTED] wrote:
> I have a simulation that runs many times with different parameters,
> and I want to aggregate the output into a single file with one rub: I
> want a header to be written only the first time. My program looks a
> bit like this:
>
> def main():
> fo
I have a simulation that runs many times with different parameters,
and I want to aggregate the output into a single file with one rub: I
want a header to be written only the first time. My program looks a
bit like this:
def main():
for param in range(10):
simulate(param)
def simulat