Hi,
This sounds like a good proposal. It adds a useful feature while not
affecting the current operation, so it won't be disruptive. So feel
free to add this to the trunk. For the implementation, a similar file
naming concept already exists. Have a look at:
http://www.nmr-relax.com/api/3.2/lib.errors-pysrc.html#save_state
Maybe it would be best to share this time stamping code - you could
create a new lib.date module and shift, and modify, the following
lines into a new function there:
# Append the date and time to the save file.
now = time.localtime()
file_name = "relax_state_%i%02i%02i_%02i%02i%02i" % (now[0],
now[1], now[2], now[3], now[4], now[5])
This would then be reusable in other parts of relax, or for power
users accessing the relax library.
Regards,
Edward
On 30 May 2014 12:54, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> wrote:
Hi Edward.
I was thinking of an auto log file function.
If one just provide "-t" or "-l" with no argument, it will default to
from time import strftime
strftime("%Y%m%d_%H%M%S").log
'20140530_125334'.log
If a script name is provided, it will be:
script_name_20140530_125334.log
What do you think?
Best
troels
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-devel mailing list
relax-devel@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel