By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,497 Members | 1,295 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,497 IT Pros & Developers. It's quick & easy.

questions about py2exe and wax

P: n/a
Using py2exe, I can convert a GUI Application with PythonCard to a
standalone windows program, and it works.
Then I try another GUI Toolkit named Wax, implement a GUI App, it
works. And I convert that app by py2exe. But this time, when run, it
show a messagebox that says:

"""
This application requires a version of wxPython greater than or equal
to 2.6, but a matching version was not found.

You currently have these version(s) installed:

Would you like to download a new version of wxPython?
"""
any suggestion?

the follows are the code of setup.py and the GUI App test.py.
///////////////////////////////////////////////////////////////////////////////////////////////
#setup.py

from distutils.core import setup

# py2exe stuff
import py2exe, os

setup(name='test',
version='0.1',
url='about:none',
author='anonymous',
au****************@127.0.0.1',
package_dir={'test':'.'},
packages=['test'],
windows=['test.py'],
)

///////////////////////////////////////////////////////////////////////////////////////////////
# test.py

import sys
sys.path.append("../..")

from wax import *

WaxConfig.default_font = ("Verdana", 9)

class MainFrame(Frame):
def Body(self):
self.AddComponent(Button(self, "one", event=self.OnClick))
self.Pack()
def OnClick(self, event=None):
# show an empty dialog... ugly, but it should work
dlg = Dialog(self, "JUst some dialog")
print dlg.OnCharHook
print dlg.ShowModal()
dlg.Destroy()

app = Application(MainFrame)
app.MainLoop()
///////////////////////////////////////////////////////////////////////////////////////////////

Dec 31 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
iclinux wrote:
Using py2exe, I can convert a GUI Application with PythonCard to a
standalone windows program, and it works.
Then I try another GUI Toolkit named Wax, implement a GUI App, it
works. And I convert that app by py2exe. But this time, when run, it
show a messagebox that says:

"""
This application requires a version of wxPython greater than or equal
to 2.6, but a matching version was not found.

You currently have these version(s) installed:

Would you like to download a new version of wxPython?
"""
any suggestion?


I got the same problem. Apparently the wxversion-related code in
wax/core.py that doesn't work well with py2exe. Try commenting out the
try..except clause in core.py; this worked for me. (Of course, I'll
have to think of a better solution for future releases of Wax...)

Feel free to contact me by private mail if you need more help.

Cheers,

--
Hans Nowak
http://zephyrfalcon.org/
Dec 31 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.