Pass command line parameters to uwsgi script
python, uwsgi, wsgi
Solution
python args:
--pyargv "foo bar"
sys.argv
['uwsgi', 'foo', 'bar']
uwsgi options:
--set foo=bar
uwsgi.opt['foo']
'bar'
Problem
I'm trying to pass arguments to an example wsgi application, : ``` config_file = sys.argv[1] def application(env, start_response): start_response('200 OK', [('Content-Type','text/html')]) return [b"Hello World %s" % config_file] ``` And run: ``` uwsgi --http :9090 --wsgi-file test_uwsgi.py -???? config_file # argument for wsgi script ``` Any smart way I can achieve it? Couldn't find it in uwsgi docs. Maybe there is another way of providing some parameters to the wsgi application? (env. variables are out of scope)