Hello all,
I often use now() and strftime() from datetime, but it seems like I
can't import just those functions. The os module allows me to import
like this:
from os.path import join,expanduser
but I get an error if I try
from datetime.datetime import now, strftime
But if I import all of os and datetime, I can use those functions by
writing the full 'path' 3 levels deep:
os.path.expanduser('~')
datetime.datetime.now()
Is there a way to import individual functions from datetime.datetime?
Also, is there proper terminology for each of the 3 sections of
os.path.expanduser('~') for example? Such as
os - library (or module?)
path - ?
expanduser - function
Thanks!
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor