Read INI-File

Franz GEIGER fgeiger at datec.at
Tue Feb 27 09:22:30 EST 2001


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