Just upgraded to wx 2.8

Hi Werner -

I'm having a hard time finding anything about a code converter from Boa.
Do you have a link? I'm looking at about 225,000 lines of code in
Python, so the concept of changing all the code is a bit daunting. Do
you suppose that's the problem that is causing this error? Any reason
aside from just being more practical to switch from importing *?

Our build script also clears out the dist folder before it rebuilds,
although it actually deletes the entire dist folder.

Any other ideas?

···

-----Original Message-----
From: Werner F. Bruhin [mailto:werner.bruhin@free.fr]
Sent: Wednesday, January 31, 2007 2:07 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Just upgraded to wx 2.8

Hi Aaron,

Aaron Rubin wrote:
> I am using py2exe (version 0.6.6) along with Python 2.4 and
wxPython
> 2.8. I was using wxPython 2.6 before.
>
> I can run my application just fine from Wing IDE, but when
I build it
> using py2exe, I get the following error
>
> AttributeError: 'module' object has no attribute 'build'
>
> This happens on the line of code:
>
> from wx import *
One you should no longer use this type of import, change it to:

import wx

And make corresponding changes in your code (e.g. wxFrame
becomes wx.Frame etc), if there is a lot of code you might
want to look at Boa's
2.4 to 2.5/2.6 code converter - it converts a lot of the code
but there are still some things you might have to do manually.

Allows when you change e.g. Python, or wxPython you should
clear the dist folder of py2exe, I just include the following
code in my setup.py.

# cleanup dist and build directory first (for new py2exe
version) if os.path.exists("dist/prog"):
    shutil.rmtree("dist/prog")

if os.path.exists("dist/lib"):
    shutil.rmtree("dist/lib")

if os.path.exists("build"):
    shutil.rmtree("build")

Hope this helps
Werner

>
> I have noticed that the module 'build' is relatively new, so maybe
> something is cached somewhere?
>
> Any idears? Thanks!
>
> - Aaron Rubin
>
----------------------------------------------------------------------
> --
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.17.17/661 - Release Date:
> 30/01/2007 23:30
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

Hi Aaron,

maybe this will help:
http://wiki.wxpython.org/index.cgi/Boa040Upgrade

and… just in case you missed it… there is a deprecation warning:

"The wxPython compatibility package is no longer automatically generated "
"or activly maintained.  Please switch to the wx package as soon as possible.",

Do you have 225 kloc of UI code? That sounds huge. Don’t you have some kind of data/display separation? MVC/MVP and friends?

Peter

···

On 1/31/07, Aaron Rubin Aaron.Rubin@4dtechnology.com wrote:

Hi Werner -

I’m having a hard time finding anything about a code converter from Boa.
Do you have a link? I’m looking at about 225,000 lines of code in
Python, so the concept of changing all the code is a bit daunting. Do

you suppose that’s the problem that is causing this error? Any reason
aside from just being more practical to switch from importing *?

Our build script also clears out the dist folder before it rebuilds,

although it actually deletes the entire dist folder.

Any other ideas?

-----Original Message-----
From: Werner F. Bruhin [mailto:werner.bruhin@free.fr
]
Sent: Wednesday, January 31, 2007 2:07 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Just upgraded to wx 2.8

Hi Aaron,

Aaron Rubin wrote:

I am using py2exe (version 0.6.6) along with Python 2.4 and
wxPython
2.8. I was using wxPython 2.6 before.

I can run my application just fine from Wing IDE, but when

I build it

using py2exe, I get the following error

AttributeError: ‘module’ object has no attribute ‘build’

This happens on the line of code:

from wx import *
One you should no longer use this type of import, change it to:

import wx

And make corresponding changes in your code (e.g. wxFrame
becomes wx.Frame etc), if there is a lot of code you might
want to look at Boa’s
2.4 to 2.5/2.6 code converter - it converts a lot of the code
but there are still some things you might have to do manually.

Allows when you change e.g. Python, or wxPython you should
clear the dist folder of py2exe, I just include the following
code in my setup.py.

cleanup dist and build directory first (for new py2exe

version) if os.path.exists(“dist/prog”):
shutil.rmtree(“dist/prog”)

if os.path.exists(“dist/lib”):
shutil.rmtree(“dist/lib”)

if os.path.exists(“build”):
shutil.rmtree(“build”)

Hope this helps
Werner

I have noticed that the module ‘build’ is relatively new, so maybe

something is cached somewhere?

Any idears? Thanks!

  • Aaron Rubin

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.17/661 - Release Date:
30/01/2007 23:30


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org


There is NO FATE, we are the creators.