> Is there a reason why __file__ can not be set automatically by > Python ? Hysterical raisins. __file__ is set by the import machinery, but a "main" program is never "imported". Fred will make it so for Python 2.3, though. --Guido van Rossum (home page: http://www.python.org/~guido/)