When I import module urllib in cmd I have only magic fuctions but when I import this module from Spyder I have all attribute.
I'm adding printscreen of this.
Why can not I import all attribute?
When I import module urllib in cmd I have only magic fuctions but when I import this module from Spyder I have all attribute.
I'm adding printscreen of this.
Why can not I import all attribute?
To import all attributes of a module into the global namespace use from module import *
.
While dir()
simply lists the attributes of the global namespace, dir(module)
lists the ones in the scope of the specific module.
Anyway, when you import urllib
you can still reach all attributes if you specify the module name, e.g. urllib.request
.