[uWSGI] ini and uwsgi EmbeddedModule

Łukasz Wróblewski admin at hostowisko.pl
Thu Nov 4 11:33:07 CET 2010

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

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:
import uwsgi
print uwsgi.argv
and output example:
or better:

In application I use the ConfigParser, but I do not know the file name.

Łukasz Wróblewski
www.nri.pl  - Nowoczesne Rozwiązania Internetowe
www.hostowisko.pl  - Profesjonalny i tani hosting
www.katalog-polskich-firm.pl  - Najlepszy darmowy katalog firm

More information about the uWSGI mailing list