Mike Hoy wrote:
I have the following code:
import gzip
import datetime
date = datetime.date.today()
name = date.strftime('%m-%d-%Y')+'.gz'
date.strftime('%m-%d-%Y')+'.gz'
print "The name of the file will be", name
the output is:
The name of the file will be
The name of the file will be 06-08-2009.gz
I can't figure out why 'The name of the file will be' is printing
twice. Any help appreciated.
------------------------------------------------------------------------
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor
Running from a console the expected output would actually be
06-08-2009.gz
The name of the file will be 06-08-2009.gz
Other than that side effect it works with only 1 print.
--
Kind Regards,
Christian Witts
Data Management
C o m p u s c a n | Confidence in Credit
Telephone: +27 21 888 6000
National Cell Centre: 0861 51 41 31
Fax: +27 21 413 2424
E-mail: [email protected]
NOTE: This e-mail (including attachments )is subject to the disclaimer published at: http://www.compuscan.co.za/live/content.php?Item_ID=494.
If you cannot access the disclaimer, request it from
[email protected] or 0861 514131.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor