~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/common/interpret.py

  • Committer: mattgiuca
  • Date: 2007-12-20 04:06:35 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:98
common/interpret.py: Now passes the location of the python interpreter to the
    trampoline, as required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
class Dummy:
76
76
    pass
77
77
 
78
 
def execute_cgi(trampoline, uid, jail_dir, working_dir, script_path, req):
 
78
def execute_cgi(interpreter, trampoline, uid, jail_dir, working_dir,
 
79
                script_path, req):
79
80
    """
80
81
    trampoline: Full path on the local system to the CGI wrapper program
81
82
        being executed.
106
107
 
107
108
    # usage: tramp uid jail_dir working_dir script_path
108
109
    pid = subprocess.Popen(
109
 
        [trampoline, str(uid), jail_dir, working_dir, script_path],
 
110
        [trampoline, str(uid), jail_dir, working_dir, interpreter,
 
111
        script_path],
110
112
        stdin=f, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
111
113
        cwd=tramp_dir)
112
114
 
188
190
 
189
191
interpreter_objects = {
190
192
    'cgi-python'
191
 
        : functools.partial(execute_cgi, location_cgi_python),
 
193
        : functools.partial(execute_cgi, "/usr/bin/python",
 
194
            location_cgi_python),
192
195
    # Should also have:
193
196
    # cgi-generic
194
197
    # python-server-page