I use wx.lib.pubsub (Windows, Python 2.6)
When run my app with interpreter, the version of pubsub is 1
When i compile and run my app, the version of pubsub is 3
Why ? How can i force compiled version to run pubsub api v1 ?
from distutils.core import setup
import py2exe
from distutils.core import Distribution
setup(
console=[
dict(
script='test.py'
)
],
options={
'py2exe': {
'packages' : [
'wx.lib.pubsub'
],
'includes': [],
"excludes" : [],
"dll_excludes": [ 'tcl85.dll', 'tk85.dll', 'mswsock.dll', 'powrprof.dll']
}
},
)
from wx.lib.pubsub import pub
publisher = pub.Publisher()
print pub.PUBSUB_VERSION
EVENT_NAME = "test_pubsub"
def listener(data):
print data
publisher.subscribe(listener, EVENT_NAME)
publisher.sendMessage(EVENT_NAME, data="toto")