Hi,
I am writing a program that will take several days to execute :) and would
like to append to a log file but be able to open that file at any time and
see the errors that have occured.
So this is what I am doing:
--
flog = open('out.log', 'a')
...
Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
>If you open the file in binary mode, you can easily keep track of the
>position in file:
>
>bytepos = 0
>with file(filename) as f:
> for line in f:
> ... process line ...
> bytepos += len(line)
>
>If you need to restart the operation, simply seek
Hi,
Simple question. Is it possible in python to write code of the type:
-
while not eof <- really want the EOF and not just an empty line!
readline by line
end while;
-
What I am using now is the implicit for loop after a readlines().
>Karim Ali wrote:
>
> > What I still dont know though is how do I handle the fact that the first
> > script is expecting command line parameters. I would like to be able to
> > replace the command line parameters by a variable such that the second
> > script can ca
ich accepts com. line par. from another
>scriptand error control
>Date: Wed, 23 May 2007 17:21:47 -0700
>
>Karim Ali wrote:
> > def MAIN(expression2parse)<- add a main so can
> > call from other script
>
>Of course you don't mean yo
Hi,
I would really appreciate help on this. I have a script (s1.py) which I
would like to call from another script (s2.py). No problem there.
The first issue is that s1.py has a command line parser which I would like
to keep but instead of fetching the information from the command line, I
woul