> If you need something that works both on a frozen app as well as an
> (unfrozen) python
> script, you'd be better off using something like:
> 
> def getAppPrefix():
>     """Return the location the app is running from
>     """
>     isFrozen = False
>     try:
>         isFrozen = sys.frozen
>     except AttributeError:
>         pass
>     if isFrozen:
>         appPrefix = os.path.split(sys.executable)[0]
>     else:
>         appPrefix = os.path.split(os.path.abspath(sys.argv[0]))[0]
>     return appPrefix
> 
Vincent,

This sounds interesting.  A few questions for you:
Why don't I see sys.frozen in interpreter?  
Does it only appear when it is frozen?  
What do you mean by frozen, how does python know?
What does sys.executable do?

Thanks,

Greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to