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