Re: [Tutor] library terminology and importing

2016-02-21 Thread Martin A. Brown
Good morning, I'm inverting the order of your questions, because I think the order of the answers may help. >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() [... hold onto your hat,

Re: [Tutor] library terminology and importing

2016-02-21 Thread Ben Finney
street.swee...@mailworks.org writes: > I get an error if I try > > from datetime.datetime import now, strftime ‘datetime.datetime’ is not a module, so you can not import objects from it. > But if I import all of os and datetime, I can use those functions by > writing the full 'path' 3 levels dee

[Tutor] library terminology and importing

2016-02-21 Thread street . sweeper
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