Stumped on pubsub with py2exe

David,

Have you tried :

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.

Let us know what you find.

Oliver

(main developer of pubsub)

···

On Sat, Jul 16, 2011 at 1:29 PM, David LePage dwlepage@yahoo.com wrote:

I’ve tried to get a simple program to compile into an executable using py2exe.

The program is very basic to show my problem.

No matter what I do, I can’t get the program to compile to support either v1 or

v3 pubsub (i’ll convert code to either if I can something to run).

I’ve attached the program and setup.py here - can anyone see what i’m doing

wrong?

When I run the programs import statements in the interpreter, I get:

E:\pythonTest>c:\Python27\python.exe

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win

32

Type “help”, “copyright”, “credits” or “license” for more information.

from wx.lib.pubsub import setupv1

from wx.lib.pubsub import pub

print pub.VERSION_STR

1.1.200904.r159

^Z

WX version is:

import wx

print wx.version()

2.8.12.0 (msw-unicode)

No matter what I try, I can’t run the executable. I’ve followed all of the other

threads and spent a couple days trying to figure this out to no avail. Before I

downgrade wxpython and python (which i’d rather not do), can anyone point me in

the right direction?

thanks!

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Ah I’m glad that helped you solved your problem. The trick (of starting from something I know works) has helped me so many times…

Don’t forget the “from pubsub import setupkwargs” if you want to use the most “modern” interface provided by pubsub. And thanks for posting your solution, this will help others I’m sure. Cheers,

Oliver

···

On Sat, Jul 16, 2011 at 10:59 PM, David LePage dwlepage@yahoo.com wrote:

Oliver,

Thanks very much for the response, you lead me in the right direction. I had read all of the threads, but when I went to the py2exe wx examples you pointed out, that tipped me off. When I used a generic example and adding the import statement you mentioned, the app exe didn’t run and gave the error: “Import Error: module pubsub not found”,

I looked further at the py2exe examples you mentioned and the py2exe setup.py showed my that my mistake was that I didnt have the “options” directive inside of the “setup” directive.
[…snip…]