Python app engine non-standard package import -
i need non-standard app engine package named qrcode. pure python lib depends on pil, supported app engine.
my folder structure is:
app |--- handlers/ |------ my_handler.py |--- util/ |------ __init__.py |------ qrcode/ |--------- __init__.py |--------- qrcode/ |------------ __init__.py |------------ other lib files |--- index.py
on index.py
map my_handler.py
, on my_handler.py
call from util.qrcode import qrcode
inside 1 of handler classes' method. problem importerror: no module named qrcode.main
on __init__.py
file.
__init__.py:
from qrcode.main import qrcode, make qrcode.constants import * qrcode import image
qrcode.main
1 .py file inside qrcode
package (to see whole package, check repository linked here)
i looked , can't find wrong. i'd appreciate help. thanks!
other questions searched:
appengine server cannot import atom module
import custom package in python google app engine
importing nested modules in python
the python path include directory app.yaml lives. if that's app
module lives, should use absolute imports:
# in index.py app.handlers import my_handler # in my_handler.py app.util.qrcode import qrcode
Comments
Post a Comment