>>>>> davidj411 <[email protected]> (d) wrote:
>>>
>>> > <--code below -->>
>>> > print time.strftime('%m-%d-%Y %H:%m:%S')
>>> > <--code above -->>
>d> here is the function:
>d> def log_out(msg,servername='std.out'):
>d> print msg
>d> open(log_dir + '\\' + servername + ".log",'a').write(servername + "-"
>d> + time.strftime('%m-%d-%Y %H:%M:%S') + " " + msg+'\n')
>d> on each pass, it should output the newer time (whether recursive or
>d> not, right) ?
How come your strftime is now different from the first posting? Are you
cheating?
If you want to ask a question about why your code is not working
properly there are a few important rules:
1. Copy and paste your code, and at least all relevant stuff (preferably
a minimal example that shows the problem). *DO NOT RETYPE THE CODE*
2. Copy and paste the output. *DO NOT RETYPE THE OUTPUT*
3. Tell what the expected or desired output is.
--
Piet van Oostrum <[email protected]>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: [email protected]
--
http://mail.python.org/mailman/listinfo/python-list