Take the 2-minute tour ×

Previously, I have a Google App Engine application (jstock-static), which is only used to host some static files so far. Inside folder WEB-INF, here are the content



<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">


<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">

Now, I would like to host some python scripts. Instead of creating another application, I decide to make the scripts re-inside jstock-static application.

I add 2 new files to see whether it works. (They are highlighted in red)

enter image description here

Here is the content of newly added files.


application: jstock-static
version: 1
runtime: python
api_version: 1

- url: /.*
  script: helloworld.py

I then try to upload it to app engine server using the following command.

C:\Projects\jstock-static\war>c:\appengine-java-sdk-1.3.2\bin\appcfg.cmd update .

However, when I make a request through web browser using http://jstock-static.appspot.com/helloworld.py, the script is not being executed. Instead, the entire python script was being downloaded.

May I know is there anything I had missed out?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can't execute Python code from an application running on the Java runtime (unless you use Jython). Python applications don't go inside a war, and need to be deployed using the appcfg.py script in the Python SDK.

share|improve this answer
But it seems like is something can be done. code.google.com/appengine/kb/java.html#pythonandjava Running both Python and Java in the same application? –  Cheok Yan Cheng Aug 17 '11 at 12:32
You need to have a completely separate version of your application that uses the Python runtime, with a different version number, and deployed separately. They will not be available at the same hostname; non-default ones need to be accessed at version.latest.yourapp.appspot.com –  Wooble Aug 17 '11 at 12:37

Your Answer


