Is there a portable way in Python 2.3a2 to discover if an application is running from a .app bundle versus running from the command line? Most of my other runtime decisions are made based on sys.platform and os.name, but on MacOS X, you can choose to run my app with X11 from the command line, or with aquaTK from the .app bundle so I need a way to distingush them. Thanks.