Cython package with __init__.pyx: Possible?

前端 未结 2 516
面向向阳花
面向向阳花 2020-12-05 13:56

Is it possible to create a Python 2.7 package using __init__.pyx (compiled to __init__.so)? If so how? I haven\'t had any luck getting it to work

2条回答
  •  无人及你
    2020-12-05 14:23

    Try using a relative import.

    in __init__:

    from . import bar

    Might also be from . import foo. Haven't used python 2 cython in a while.

提交回复
热议问题