只能将Python .pyc文件部署到Google App Engine? [英] Can I deploy Python .pyc files only to Google App Engine?
问题描述
所以我猜问题是我可以上传一个只包含该片段的.pyc文件的代码?我已经在应用程序中完成了一个带有views.pyc文件的基本测试,但事情不起作用。是否有一些配置或其他可以设置允许Google App Engine只使用.pyc文件?
我意识到当您提出这个问题时,您无法做到这一点,但现在您可以使用Python 2.7。请参阅 Python 2.7中的沙盒 :
您可以上传并使用
.pyc
,但不能与.py
文件。您可以上传包含.py
或.pyc
文件(或组合)的zip文件。
I'm working on a project utilizing Django on Google App Engine. I've been asked if some of the code can be deployed as compiled only.
So I guess the question is can I upload a .pyc file only that contains the piece of code in question? I've done a basic test with a views.pyc file in an application and things don't work. Is there some configuration or other that I can set to allow Google App Engine to just use the .pyc files?
I realise you couldn't do this when you asked this question, but you can now, if you use Python 2.7. See Sandboxing in Python 2.7:
You can upload and use
.pyc
, but not in combination with.py
files. You can upload zip files containing.py
or.pyc
files (or a combination).
这篇关于只能将Python .pyc文件部署到Google App Engine?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!