summaryrefslogtreecommitdiff
path: root/contrib/pyuwsgi.py
blob: a478ff9771e3e1c18433fe9068df47f6481466cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import sys
import os
import pyuwsgi

orig_args = sys.argv
orig_executable = sys.executable
orig_args.insert(0, orig_executable)

uwsgi_args = []

for arg in sys.argv[2:]:
    uwsgi_args.append(arg)

# pyuwsgi.run('welcome.ini')
pyuwsgi.run(uwsgi_args)

# if you are here uWSGI has been reloaded
os.execv(orig_executable, orig_args)