[Pyrex] Importing a python module
Andreas Kostyrka
andreas at kostyrka.org
Sat Mar 29 23:38:12 CET 2008
Some hints.
Start a python, try out the import. Does it work?
create a glGo/__init__.py
You probably need to have . (whereever that is) on your PYTHONPATH
somehow.
Andreas
Am Samstag, den 29.03.2008, 23:30 +0100 schrieb Mathijs Romans:
> Hello,
>
> sorry, but I have a bit of a newbie quiestion. I am looking at some code here
> that has this structure:
>
> ./sgf/sgf.pyx
> ./glGo/utils.py
> ./glGo/utils.pyc
>
> the file ./sgf/sgf.pyx starts with:
>
> import glGo.utils
>
> is this really supposed to work like this? The functions in utils.py can't be
> found during runtime of the binary code. I then inserted in the
> file ./sgf/sgf.pyx the lines
>
> import sys
> sys.path.append("../")
>
> but this doesn't solve the problem. I am surprised that one supposedly can
> just "include " a .py file in a .pyx file. Sorry that I don't really have a
> clue what is going on here... any help is appreciated.
>
> Mathijs
>
>
>
> _______________________________________________
> Pyrex mailing list
> Pyrex at lists.copyleft.no
> http://lists.copyleft.no/mailman/listinfo/pyrex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20080329/d494598b/attachment.bin
More information about the Pyrex
mailing list