On 2007-05-02, Matimus <[EMAIL PROTECTED]> wrote: >> I think I have an import misconception. >> >> I use >> import from time localtime, strftime >> t = strftime('%m/%d/%Y %H:%M', localtime()) >> >> This works. How would one use it with the module name pre-pended? > > I would think that what you have written there shouldn't work at > all...
It doesn't. > it would need to be: > > [code] > from time import localtime, strftime > [/code] > > to use the prepended module name just do this instead: > > [code] > import time > t = time.strftime('%m/%d/%Y %H:%M', time.localtime()) > [/code] or just this t = time.strftime('%m/%d/%Y %H:%M') time.strftime() has used the localtime() value by default for a while now. -- Grant Edwards grante Yow! There's enough money at here to buy 5000 cans of visi.com Noodle-Roni! -- http://mail.python.org/mailman/listinfo/python-list