[Pythonmac-SIG] how do you determine if you're running a bundlebuilder standalone?

Bob Ippolito bob at redivi.com
Sat Aug 21 21:13:52 CEST 2004


On Aug 20, 2004, at 2:09 PM, Kevin Altis wrote:

> I have the following function for determining at runtime whether a 
> program is running standalone, but it needs to be updated for Mac OS X 
> and bundlebuilder.
>
> # Thomas Heller's function for determining
> # if a module is running standalone
> def main_is_frozen():
>     return (hasattr(sys, "importers") # py2exe
>             or imp.is_frozen("__main__") # cx_freeze or tools/freeze
>             or hasattr(sys, "frozen") # McMillan installer
>             )
>
> What's the magic attribute for bundlebuilder standalones?

Why do you need to know if something is "frozen" with bundlebuilder 
anyway?  Knowing whether it's standalone or not doesn't do much for 
you.. I'm sure there's a method that will determine what you want to 
actually know whether or not it is standalone.

-bob


More information about the Pythonmac-SIG mailing list