Thanks Werner, thanks Chris, After many trials, it works.
1. add 'packages' to options in setup.py setup( app=APP, data_files=DATA_FILES, options={'py2app': {'argv_emulation': True, 'packages':['wx.lib.pubsub']}}, setup_requires=['py2app'], ) 2. due to 'packages', wx.lib.pubsub is not able to be imported from code (not found module error), so change import lines to : from pubsub import setuparg1 from pubsub import pub 3. insert a line: publisher = pub.Publisher() 4. use it publisher.subscribe(self.OnImageUpdated, 'image.updated') 2011. 9. 18., 오전 2:32, Werner F. Bruhin 작성: > On 09/17/2011 05:37 AM, Hyeonseung I wrote: >> >> Hi, >> >> I`m trying to make an app bundle via py2app from a project using wxPython >> and it`s pub feature. >> But there is a problem whenever running the app. >> >> In my code, Publisher is imported as: >> from wx.lib.pubsub import Publisher as pub > Did you see the exchange some time ago on wxPython list? > > Here a few of the threads Olivier pointed to in one of the messages: > begin quote: > http://groups.google.com/group/wxpython-users/browse_thread/thread/d448a42abdae3e69/318cc65f2b54348f?#318cc65f2b54348f > http://groups.google.com/group/wxpython-users/browse_thread/thread/786c36eec08bd321/5a35b68addbbd739?lnk=gst&q=listenerimpl# > http://groups.google.com/group/pypubsub/browse_thread/thread/98e038447af8dc0b/d59f038f0bfc1460?hl=en&q=pubsub+py2exe#d59f038f0bfc1460 > (though this is only if you are using the standalone version of pubsub, > which you download from http://www.sf.net/projects/pubsub). > > If this still doesn't work, try taking one of the py2exe examples for > wxpython and adding the import pubsub in it and redo the py2exe. I recommend > you try using the from pubsub import setupkwargs and see what happens with > that. > end quote: > > Werner > >
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG