Hello, I am trying to add the current date to a file name in python script like thus:
import os import sys import rpm import time import datetime today = datetime.date.today() print "The date is", today myFile = '/work/output1' myFile = myFile.join(today) myFile = myFile.join(".txt") print "myFile is",myFile running the scripts indeed prints the correct date , but afterwards there is the following error: The date is 2006-01-29 Traceback (most recent call last): File "addDate.py", line 13, in ? myFile = myFile.join(today) TypeError: sequence expected, datetime.date found How should I do this ? Regards, MR -- http://mail.python.org/mailman/listinfo/python-list