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
Consequences of importing the same module multiple times in C++?
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="Lie Ryan, post: 3661526"] I think it does not reload the module. Running python with verbose mode: blah@blah-laptop:~$ python -v (snip)import xml # directory /usr/local/lib/python2.6/xml # /usr/local/lib/python2.6/xml/__init__.pyc matches /usr/local/lib/ python2.6/xml/__init__.py import xml # precompiled from /usr/local/lib/python2.6/xml/__init__.pyc It's also mentioned in the docs: (paraphrased to clarify the points) ''' The system maintains a table of modules that have been ... initialized.... When a module name is found..., step (1) is finished. If not, a search for a module ... . When ... found, it is loaded. ''' [URL]http://www.python.org/doc/2.5.2/ref/import.html[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Consequences of importing the same module multiple times in C++?
Top