473,385 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

error with wxPython2.8-win32-unicode-2.8.7.1-py25.exe

I recently upgraded wxpython (and python) on XP using wxPython2.8-
win32-unicode-2.8.7.1-py25.exe

Now when I run

from wxPython.wx import *

It crashes :

-import _wx
...

from _misc import *

....

--456 wxDateTime_GetNumberOfDaysinYear =
wx._misc.DateTime_GetNumberOfDaysinYear

....

AtributeError: 'module' object has no atribute
'DateTime_GetNumberOfDaysinYear'

Is it a known problem or is there something wrong only on my side?
Dec 19 '07 #1
3 2161
I switched back to wxPython2.6 and with wxPython2.6-win32-
unicode-2.6.4.0-py25.exe
this problem mentionned eariler does not occur.
Dec 19 '07 #2
"Emmanuel" <ma******@gmail.comha scritto nel messaggio
news:ff**********************************@j20g2000 hsi.googlegroups.com...
I recently upgraded wxpython (and python) on XP using wxPython2.8-
win32-unicode-2.8.7.1-py25.exe

Now when I run

from wxPython.wx import *

It crashes :
On my win2k with 2.8.4.0 I got:
>>from wxPython.wx import *
Warning (from warnings module):
File "__main__", line 1
DeprecationWarning: The wxPython compatibility package is no longer
automatically generated or actively maintained. Please switch to the wx
package as soon as possible.

I suggest you to try
>>from wx import *
or better
>>import wx
(I don't think that importing everything is a good choice)

Enrico
Dec 19 '07 #3
On Dec 19, 5:26 am, Emmanuel <manou...@gmail.comwrote:
I recently upgraded wxpython (and python) on XP using wxPython2.8-
win32-unicode-2.8.7.1-py25.exe

Now when I run

from wxPython.wx import *

It crashes :

-import _wx
...

from _misc import *

...

--456 wxDateTime_GetNumberOfDaysinYear =
wx._misc.DateTime_GetNumberOfDaysinYear

...

AtributeError: 'module' object has no atribute
'DateTime_GetNumberOfDaysinYear'

Is it a known problem or is there something wrong only on my side?
The newer versions of wx are not supposed to be imported in this way:

from wx import *

The current correct way is to just import wx. I am not sure when this
was started, but it was more than a year ago.

Most of the time, from package import * is NOT recommended as it can
unintended consequences, such as poisoning the namespace. For example,
if you did this with a package that contained an object called "foo"
and you did this:

foo = 2

Then you just reassigned the foo that was imported.

HTH

Mike
Dec 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John | last post by:
Hi, I'm trying to get Boa running on MDK cooker but keep getting this error. I have googled around for the error and it seems to have something to do with the wxGTK version I'm using. What...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
by: Mick Duprez | last post by:
Hi All, I've installed Python 2.5 on a number of machines but on one I'm having problems with the CLI. If I fire up the 'cmd' dos box and type 'python' I get a line of gibberish and it locks up...
6
by: BartlebyScrivener | last post by:
If there is a wxPython on Debian user in the house? I am using the version of the demo that came with the apt-get download of wxPython. I thought I'd followed the instructions for installing and...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
5
by: yashu0209 | last post by:
I have an error occurring when i try to compile the program and the error is: D:\Program Files\visual studio 6.0\MSDev98\MyProjects\GLEnabledView\GLNew.cpp(164) : error C2653: 'CGLEnabledView' :...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.