[Tutor] fileinput question

Ezra Taylor ezra.taylor at gmail.com
Mon Aug 25 03:26:37 CEST 2008


Hello all:
                 Can I do the below with input() from fileinput?  If
this is not possible, what can I do to create backup files with the
date timestamp as an extension.  Thanks for you help all.


from time import strftime

for line in fileinput.input(inplace=1,backup='.strftime("%Y-%b-%d.%S")'
           do something.
-- 
Ezra Taylor


More information about the Tutor mailing list