Zipimport in PyCharm
Does PyCharm code inspector allow zipimport? I'm trying to make App Engine application with zipped framework with code like this:
import sys
sys.path.insert(0, 'framework.zip')
import framework
It works well, but code inspector doesn't see framework and shows a lot of unexisting errors in code. Am I doing something wrong or PyCharm doesn't support zipimport?
Please sign in to leave a comment.
Hello Alexey,
PyCharm does support imports from zip files, but it doesn't have any automatic
way to figure out where the zip file is by looking at your code. You'll need
to add the zip file manually to the interpreter paths in Settings | Python
Interpreter.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I've added zip file to interpreter paths, but references still shows as unresolved. After closing and re-opening project current zip file disappears from paths.
Hello Alexey,
Please try PyCharm 1.1 released today; it has a number of fixes related to
this issue.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks, 1.1 works great.