python demo version clash

Hi all,

Thanks to Eric I found the demo, but it seems I have two wxPython
versions installed. One by wxGlade (wxPython 2.6.x.x) and one from the
RPM (wxPython 2.8.4.0). I tried running wxGlade on the latest wxPython
but it simply hung upon loading my project (CVS version from today).
So I installed wxGlade 0.4.x.x which seemed to work better.

But now I have the python demo that reports:

  File "demo.py", line 3, in <module>
    import Main
  File "/home/jorg/Desktop/demo/demo/Main.py", line 35, in <module>
    import wx.aui

I had this in my own app, and solved it by adding an __init__.py file
with the lines;

import wxversion
wxversion.select("2.8")
import wx

And my app ran with 2.8 as default no problem whatsoever. How can I do
this for the wxPython demo as well? Making wxPython 2.8 default would
kill wxGlade, so I rather tweak the demo somehow elegantly if
possible..

Regards,
- Jorgen

Edit Main.py and put the wxversion stuff before the 'import wx'.

- Josiah

···

"Jorgen Bodde" <jorgen.maillist@gmail.com> wrote:

Thanks to Eric I found the demo, but it seems I have two wxPython
versions installed. One by wxGlade (wxPython 2.6.x.x) and one from the
RPM (wxPython 2.8.4.0). I tried running wxGlade on the latest wxPython
but it simply hung upon loading my project (CVS version from today).
So I installed wxGlade 0.4.x.x which seemed to work better.

Josiah Carlson wrote:

···

"Jorgen Bodde" <jorgen.maillist@gmail.com> wrote:

Thanks to Eric I found the demo, but it seems I have two wxPython
versions installed. One by wxGlade (wxPython 2.6.x.x) and one from the
RPM (wxPython 2.8.4.0). I tried running wxGlade on the latest wxPython
but it simply hung upon loading my project (CVS version from today).
So I installed wxGlade 0.4.x.x which seemed to work better.

Edit Main.py and put the wxversion stuff before the 'import wx'.

Or edit glade and give it wxversion code to load 2.6. Then you can make 2.8 be the default for everything else.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi Josiah and Robin,

The problem was two-fold. I thought i had wxPython 2.8.4.0 installed,
but it was 2.8.1.1 from an Ubuntu RPM. So after editing main in the
wxPython demo it still didn't worked .. But after downloading the RPM
from the extra sources the demo worked great..

Since wxGlade did not work for me anymore (I filed a bug) I removed it
from the system making wxPython 2.8.4.0 default again.

Thanks again for the help!
Regards,
- Jorgen