Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Importing and namespace visibility
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Fredrik Lundh, post: 1819953"] importing something into a module only makes the names available in that module, not in every other module. (import is not some kind of global include). for the details, read the "There are Many Ways to Import a Module" section under: [URL]http://effbot.org/zone/import-confusion.htm[/URL] (and as mentioned under "What Does Python Do to Import a Module", importing a module twice doesn't load the module again; it only makes the name(s) available to the importing module). reading the following sections in the language reference may also help: [URL]http://docs.python.org/ref/naming.html[/URL] [URL]http://docs.python.org/ref/import.html[/URL] </F> [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Importing and namespace visibility
Top