that is exactly what i am looking for, but how would i add this to my
filename???
should i use this:

output_file = open(os.path.join(self.Save_Session.GetValue(),
time.strftime('%Y%m%d%H%M')), 'w')

the self.Save_Session.GetValue() is generated by a dirdialog



Uck,uck, uck, no...

That's what Kent's post was for...
This will do the trick.


filename = "%s%s.txt" % (self.Save_Session.GetValue(),time.strftime("%Y%m%d%H%M"))
output_file = open(filename,"a")


This uses string formatting, are you familiar with that?

If not -- see here http://docs.python.org/lib/typesseq-strings.html#l2h-211
remember, if you don't understand--not that you wouldn't--you can always ask here.


HTH,
Jacob


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to