views:

107

answers:

3

My app.yaml wants to do this:

  handlers:
- url: /process/(.*)
  script: process.py \1

So that I can pass an argument to the process.py script.

This was working in the SDK, but oes not seem to be possible in the production servers, possibly because they are looking for a file to execute "process.py arg" which does not exist.

Can anyone think of a way to do this without having to use a framework like django etc?

+1  A: 

This is part of their security I think.

In my code I do something similar but I just take the path that is given and then parse that to get what I want. There is a probably a better way to handle the capture group but I haven't had the need for it yet

path = self.request.path
remove the /process/ stuff and do the rest
AutomatedTester
A: 

I found that the best way to actually do this was to POST the data to the handler.

A: 

If this is working in the SDK, it's a bug - this isn't a design feature. You need to use a framework like webapp to parse the URL and pass fragments of it to your handler. Why do you not want to do so?

Nick Johnson