Google App Engine, Python, and IPython

I want to use IPython under GAE to debug scripts locally:

import ipdb; ipdb.set_trace()

but GAE limits the loading of some modules from sys.path. Can I get around this somehow?

+3
source share
1 answer

You can, of course, crack the limitations of the GAE SDK (you have your own sources on your computer and open source!), But if you do this, it will not catch cases where your code mistakenly tries to import modules that it cannot use on Google servers. Therefore, I suggest at least performing such a hack, making it conditional for some environment variable ( if os.getenv('MYHACK')=='Y':...), so that it is disabled by default (and the GAE SDK behaves normally), and you only allow it explicitly in your shell, eg,

$ MYHACK=Y ipython ...

on the command line bash(or sh;-).

0
source

Source: https://habr.com/ru/post/1760527/


All Articles