Adriano Monteiro Marques píše v Čt 02. 09. 2010 v 20:23 -0300:
> Is there a way to get this info from pyinstaller?

Hi,
 
in my app I use the following code for that:
----------

    # As standalone executable it is necessary detect parent folder
    # in another way.
    # If sys.executable or __file__ contains non ascii characters
    # it must be converted to unicode string.
    # Otherwise there are some issues, especially on windows
    if hasattr(sys, 'frozen'):
        executable = unicode(sys.executable,  
                locale.getpreferredencoding())
        basepath = normpath(dirname(executable))
    else:
        script = unicode(__file__, locale.getpreferredencoding())
        # folder where 'changingsong.py' resides
        basepath = normpath(dirname(script))

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to