[Pythonmac-SIG] py2app run errors

Ronald Oussoren ronaldoussoren at mac.com
Thu Aug 10 23:08:41 CEST 2006


On 10-aug-2006, at 13:42, William Kyngesburye wrote:
>>>
>>> base = os.path.dirname(sys.argv[0])
>>
>> This should probably be os.path.dirname(__file__)
>>
> hmm, none of the reference I have mention this one.  I guess it means
> the same as argv[0] - the path/name of the script?

__file__ is the path where the module was loaded from, which is more  
reliable than sys.argv[0].

Ronald


More information about the Pythonmac-SIG mailing list