Extending Python dynamically
nemeth at iqsoft.hu
Thu Nov 4 22:05:57 CET 1999
Robin Dunn wrote:
> > Thank you for your help. The method you suggested works perfectly!
> > However, I do not understand completely how the Python interpreter finds
> > that it has to load an so file. Normally -- I believed -- when Python sees
> > "import xxx" statement it looks for a xxx.py, xxx.pyc or xxx.pyo file in
> > $PYTHONPATH directories or an xxx subdirectory having an __init__.py file,
> > not an xxx.so file. This means that if I add the current directory to the
> > $PYTHONPATH (such as export PYTHONPATH='.' Python will find any arbitrary
> > file in the $PWD?
> It will also load xxxmodule.so as well, but .so files only get imported if
> they have an initxxx() function.
> Robin Dunn
> Software Craftsman
> robin at AllDunn.com
> http://AllDunn.com/wxPython/ Check it out!
Robin, you are a Genius! Neither the "Python Reference Manual Release
section 6.11 "The import statement" nor the Extending and Embedding the
Interpreter documents explain this behaviour of the Python interpreter.
why I felt myself a bit lost.
But now with Your help, I feel I know "everithing" ;-) about Python
I am also very happy with this mailing list (another very good ones
where I am a member are Qt's, LyX's, Apache-SSL's, etc lists). Within
some hours I got all the
support I needed -- no commercial mega-corporations are able to provide
such a quality
support even for tons of money. I remember when I spent three weeks
Visual J++ 6.0 and no one could answer my simplest questions: that was
attemp to fight with a proprietary (especially MS) development tool.
More information about the Python-list