How GAE emulator limits list of available Python modules?
I installed Python Mock module using PIP.
When I try to开发者_JAVA技巧 import mock
running under 'dev_appserver', GAE says that it can't find module 'mock'.
import mock
works perfectly in Python interpreter.
I understand that dev_appserver
behaves absolutely correctly because I can't install modules with PIP on GAE servers.
My question is how technically dev_appserver
filters list of modules that can be loaded?
The dev_appserver uses import hooks to prevent importing modules that shouldn't be available. The relevant code is here, but be warned - it's easily the most complicated bit of the dev_appserver!
精彩评论