简体   繁体   中英

Execute python on a java google app engine application

I want to execute python from a java google app engine application. I can use some libs as jython but it would be better to use native python and access the real python api.

Any idea?

You cannot deploy python and java code inside the same app version. But you can have running different version of the appspot application in java and python.

So you can simply deploy them to different versions. Note versions don't have to be numeric. You can deploy your java code to version "java" and the corresponding url will be http://java.YourApp.appspot.com ; and deploy your python to http://py.YourApp.appspot.com by using version "py"

You can let java and python versions communicate between each other by using JSON (more precisely JSONP [for cross site requests]) http://code.google.com/webtoolkit/tutorials/1.6/Xsite.html or Taskqueue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM