Il giorno 04/nov/2010, alle ore 11.33, Łukasz Wróblewski ha scritto: > W dniu 04.11.2010 11:18, Roberto De Ioris pisze: >> >> Il giorno 04/nov/2010, alle ore 10.57, Łukasz Wróblewski ha scritto: >> >>> I decided to use ini files for configuration. >>> I use to develop a single file, and to produce other. example: >>> uwsgi --ini dev.ini >>> uwsgi --ini pro.ini >>> >>> Configuration file contains my application not only uwsgi. >>> I wonder how the application level to know the ini parameter passed to >>> uwsgi? >>> >>> >> >> uWSGI search for the section [uwsgi] in your config file. >> >> all the others are ignored >> > > ok. > I'm interested what is a file name passed as a parameter to the --ini > whether or pro.ini dev.ini ? > If you start the server with the command "uwsgi --ini dev.ini" > And when i do in application: > """ > import sys > print sys.argv > """ > I have no information about the parameters. > > So I think it would be good to have something like this: > """
you can pass --pyargv option to uwsgi (or in the .ini file) that will populate sys.argv Another solution (as you have suggested) is having a dictionary like uwsgi.opt: uwsgi.opt['ini'] uwsgi.opt['socket'] and so on I will add it soon -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
