python - Does import __foo__ import from the __init__ file of the foo package? -


i've been reading code used following import statement:

import __ompc__ 

when tried grep find being imported, found was:

me@bedrock1:~/projects/pythonprojects/ompc$ grep -r "__ompc__" ./* ./build/lib.linux-x86_64-2.7/ompclib/m_compile.py:import __ompc__ ./build/lib.linux-x86_64-2.7/ompclib/m_compile.py:        codeobject =    __ompc__.compile(codestring, dfile or file,'exec') ./build/bdist.linux-x86_64/egg/ompclib/m_compile.py:import __ompc__ ./build/bdist.linux-x86_64/egg/ompclib/m_compile.py:        codeobject =    __ompc__.compile(codestring, dfile or file,'exec') binary file ./build/bdist.linux-x86_64/egg/ompclib/m_compile.pyc matches ./ompclib/m_compile.py:import __ompc__ ./ompclib/m_compile.py:        codeobject = __ompc__.compile(codestring, dfile or file,'exec') 

since __ompc__ used find method named 'compile', did recursive grep on that. found __init__.py file in ./ompc/ompc directory had compile method.

is

import __ompc__ 

gives access to? or there still going on here don't understand?

i cannot make ompclib/m_compile.py work. ompc/m_compile.py almost same file, used ompc codebase.

my conclusion that file , whole ompclib directory left-over earlier development stage , author has forgotten clean up.

the import __ompc__ import otherwise nothing more broken import. not magically transform importing ompc package. ompc/m_compile.py work, , uses import ompc instead.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -