"Dave Angel" <[email protected]> wrote

To use a relative path base = pic(file=root+"/base.gif")
<snip...>

I would get 'root' this way, rather than requiring anything to be set up by the install (registry, environment vars, config):

Good idea, I forgot that in Python you can find the full path that way.
Too used to working in C/C++ where the file macro only gives the
filename...

(Does anybody think that using __file__ this way is uncool? For example, should I better use sys.path[0] ? Or something more convoluted involving sys.modules ?)

No I think __file__ is good for this.

Alan G.

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to