开发者

How do I 'install' a module on Google App Engine?

Excuse me as I'm new to this. I've done all the searching I can, and while I know the module I want to install, I can't figure out how to install the specific module.

I'm wanting to install Python-OAuth2 to GAE, but as I can't find the specific oauth2.py 开发者_JAVA技巧file, I don't know what to copy into my app's directory on my machine (let alone if that will work).

What is the most direct way of installing third-party python modules on Google App Engine?


For this particular case, copy the entire oauth2 directory to your app's folder. It should work.


Modules in python are nothing but python files. Packages are directories that contain an __init__.py file. You can import a python file called foobar.py that resides in the same directory as the file you're importing from like so import foobar at which point you will get everything in foobar under the foobar. namespace.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜