exeter-creww / SFM_Precision

A workflow to create precision maps in python
GNU General Public License v3.0
3 stars 1 forks source link

Add date timestamp to log file for MC #44

Closed AndrewCunliffe closed 4 years ago

AndrewCunliffe commented 4 years ago

The log looks good, the only helpful thing I think is missing could be a datestamp.

Something like f.write("Analysis completed on: {0}".scr datetime.now())

, but I'm not sure how you've used format.

h-a-graham commented 4 years ago

Sure - good thinking - I'll add this in.

h-a-graham commented 4 years ago

Added f.write("Analysis completed at: {0}".format(datetime.now()))

.format can be used to enter objects into strings the 0 corresponds to the order in the .format list for example try:

print("hello, my {0} is {1}".format('name', 'Andy'))

h-a-graham commented 4 years ago

now fixed and merged