Re: Importing a python module

Greg Ewing <[email protected]>
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
Mathijs Romans wrote:
> the file ./sgf/sgf.pyx starts with:
> 
> import glGo.utils
> 
> The functions in utils.py can't be 
> found during runtime of the binary code.

The 'import' statement in Pyrex works exactly the same way
as it does in Python, i.e. any directory to be used as a
package must have an __init__.py file, and top-level
package directories must be in sys.path or PYTHONPATH,
etc.

All this happens at run time, so the Pyrex compiler
knows nothing about it (as opposed to 'cimport', which
is done at compile time).

-- 
Greg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.