Read INI-File

Marc Vollmer marc.vollmer at mahr.de
Tue Feb 27 10:18:58 EST 2001


No chance:

I try:

win32ui.SetProfileFileName('c:\winnt\test.ini')

and after copy in the application folder:

win32ui.SetProfileFileName('./test.ini')

Always it gives me the default value. Exist a functions to test, if Python
find the ini file?
Because when I print the return value from win32ui.SetProfileFileName, the
result is NONE.

Regards
Marc


"Franz GEIGER" <fgeiger at datec.at> schrieb im Newsbeitrag
news:97gd97$931$1 at rex.ip-plus.net...
> IIRC you have to set the full file path or at least "./filename.ext" if it
> is in the current dir. Check if "test.ini" is where you expect it to be
> after a write access.
>
> Regards
> Franz
>
>
> "Marc Vollmer" <marc.vollmer at mahr.de> wrote in message
> news:97gcng$oquj3$1 at ID-59219.news.dfncis.de...
> > Hello,
> >
> > I want to read information from an INI-File. But it gives me always the
> > default value. Why?
> >
> > >>> import win32ui
> > >>> win32ui.SetProfileFileName('test.ini')
> > >>> k = win32ui.GetProfileVal('Move','MoveSpeed',0)
> > >>> k
> > 0
> > >>>
> >
> > test.ini
> > ---------------------------------------------------------
> > [MOVE]
> > MoveSpeed=150
> >
> >
> > Thanks
> > Marc Vollmer
> >
> >
>
>





More information about the Python-list mailing list