But note that `datetime` does not magicly get put in the script's
namespace.
Module A:
import datetime
Script:
import A
In the code in module A the name datetime is known and can be used.
In the code in the script the name A is known and can be used. Importing
A does not magicly set the name datetime in the script's namespace -
imagine the the pollution!
You _can_ access it as A.datetime because it is in the A module's
namespace. But really if you just wanted datetime for direct use in the
script you would import it there too:
import datetime
import A
Note that the datetime module is only actually loaded once. The import
binds the name into your local namespace like any other variable.
Cheers,
Cameron Simpson <
c...@cskk.id.au>