adding current date to a file name in a python script
sybrenUSE at YOURthirdtower.com.imagination
Sun Jan 29 10:11:54 CET 2006
markryde at gmail.com enlightened us with:
> myFile = '/work/output1'
> myFile = myFile.join(today)
> myFile = myFile.join(".txt")
join does something completely different. You want:
myFile = '/work/output1/%s.txt' % today
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
More information about the Python-list