Hi,
When using PyObjc (on OSX) in a non-packaged app the Foundation namespace
contains most (or all?) of the functions, but when packaged the namespace
becomes nested with several seemingly superfluous levels. Below is a code sample
that illustrates.
Is this a bug in PyInstaller?
Glenn
------
import sys
import Foundation
def main():
if getattr(sys, 'frozen', False):
# packaged
print "Foundation.Foundation.NSFullUserName:",\
Foundation.Foundation.NSFullUserName()
loc = Foundation.CoreFoundation.CoreFoundation.CFLocaleCopyCurrent()
countryCode = Foundation.CoreFoundation.CoreFoundation.CFLocaleGetValue(
loc,
Foundation.CoreFoundation.CoreFoundation.kCFLocaleCountryCode)
countryName =
Foundation.CoreFoundation.CoreFoundation.CFLocaleCopyDisplayNameForPropertyValue(
loc,
Foundation.CoreFoundation.CoreFoundation.kCFLocaleCountryCode,
countryCode)
else:
# non packaged
print "Foundation.NSFullUserName:",\
Foundation.NSFullUserName()
loc = Foundation.CFLocaleCopyCurrent()
countryCode = Foundation.CFLocaleGetValue(
loc,
Foundation.kCFLocaleCountryCode)
countryName = Foundation.CFLocaleCopyDisplayNameForPropertyValue(
loc, Foundation.kCFLocaleCountryCode, countryCode)
print countryName, countryCode
if __name__=="__main__":
main()
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.