[Tutor] path
alan.gauld@bt.com
alan.gauld@bt.com
Fri, 1 Mar 2002 14:15:00 -0000
> ok, I want to have a program tell itself where it lives, so it can
> figure out path information.
OK, you could use the os module commands - getcwd() I think?
BUT...
> I want it to read a config file, but it has to know where it is
I think a better approach for this is to use an Envirinment
Variable TMCONFIG say and then use os.getenv() to read it.
That way users have some f;exibility to put the config file
where they want...
Alan G