adding current date to a file name in a python script
Sybren Stuvel
sybrenUSE at YOURthirdtower.com.imagination
Sun Jan 29 04:11:54 EST 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
Sybren
--
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?
Frank Zappa
More information about the Python-list
mailing list