a couple of thoughts:
sys.argv[ 0 ], this I considered as an alternative to the __file__ attribute.  The problem with using this is that it will most likely return a wrong value from which other pieces can't be loaded.  If the field is expecting the location in the filesystem of leo.py, then if leo.py is in itself imported from within another module, this will be wrong if the importing code is in a different location.
 
Why isn't there a __file__ attribute in the locals of a module?  Why is there a need from within a module to reimport itself so it can get at the __file__ info?  Right now, the only reason I have seen to reimport itself is to get at this valuable data.
 
we do this:
import myself
 
so we can do this
print myself.__file__
 
wouldn't it just be nicer if you could just do this:
print __file__
 
and have the thing work?  I can't think of a reason why this shouldn't be there.  Why wouldn't a module want to be able to know where it lives?  Would this be too terrible of a break from python?
 
thoughts amigos?
leouser
 
 
 
 
 
 

 
 

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com