newbie, relative path

Terry Reedy tjreedy at home.com
Wed Oct 31 10:48:27 EST 2001


"Marcus Stojek" <stojek at part-gmbh.de> wrote in message
news:3bdff425.12589703 at news.easynews.net...
> Hi,
> 2 little questions.:
>
> 1.
> I have a small script that uses an .ini file for configuration. How
> can I open the file config.ini that is in the same dir as the script
> itself? (script dir is changing)
>
> config=open("?????config.ini","r")

Look at path modules for finding and changing current directory.

Terry J. Reedy






More information about the Python-list mailing list