473,395 Members | 1,631 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,395 software developers and data experts.

Diffrences: Python 2.3 and Python 2.4

Hi there,

I have an application written in Python 2.3, wxPython 2.4 , C++, OpenGL
OS: Fedora Core 3

Now I need to upgrade it using Python 2.4 and wxPython 2.6 OS: Fedora Core 6
There was a few minor faults and it was easy to fix
But now I get this Segmentation fault error message

What is the diffrences between Python 2.3 and Python 2.4?
What is the diffrences between wxPython 2.4 and wxPython 2.6?
Jan 5 '07 #1
19 1872
bartonc
6,596 Expert 4TB
Hi there,

I have an application written in Python 2.3, wxPython 2.4 , C++, OpenGL
OS: Fedora Core 3

Now I need to upgrade it using Python 2.4 and wxPython 2.6 OS: Fedora Core 6
There was a few minor faults and it was easy to fix
But now I get this Segmentation fault error message

What is the diffrences between Python 2.3 and Python 2.4?
What is the diffrences between wxPython 2.4 and wxPython 2.6?
The big problems seem to come when attempting to import modules that were compiled with earlier versions of the core include and header files into a newer version of python. On Widows, we get a very clear message that say something like "that was compiled with an earlier version of python". I've also read that compiled modules should be built with THE SAME compiler as python was built with, but, again, this issue is seldom seen on Windows because the production version of python is built with VC++. So if you have source code you can compile troublesome modules with current include and header files. If not look for current binaries (I have this problem with python-MySQLd).
As for wx, I didn't start using it until V2.6 and skipped the part of the release notes that talked about backward compatability. I do know that there are some issues, however. Of course, wx is now in version 2.8 as of December, 2006.
Jan 6 '07 #2
The big problems seem to come when attempting to import modules that were compiled with earlier versions of the core include and header files into a newer version of python. On Widows, we get a very clear message that say something like "that was compiled with an earlier version of python". I've also read that compiled modules should be built with THE SAME compiler as python was built with, but, again, this issue is seldom seen on Windows because the production version of python is built with VC++. So if you have source code you can compile troublesome modules with current include and header files. If not look for current binaries (I have this problem with python-MySQLd).
As for wx, I didn't start using it until V2.6 and skipped the part of the release notes that talked about backward compatability. I do know that there are some issues, however. Of course, wx is now in version 2.8 as of December, 2006.
I am going to check it out. But wxPython is only a GUI toolkit. Off course I am used to working on Windows from home as well. So far I havent test this program's compatibility on windows, thank you for your input
Jan 10 '07 #3
bartonc
6,596 Expert 4TB
I am going to check it out. But wxPython is only a GUI toolkit. Off course I am used to working on Windows from home as well. So far I havent test this program's compatibility on windows, thank you for your input
You are welcome for the input. I have gotten to know wxPython quite well over the past 6 months (the most common widgets and all the methods of EVT_* class objects), so if you have questions there, I can probably guide you.
Jan 10 '07 #4
You are welcome for the input. I have gotten to know wxPython quite well over the past 6 months (the most common widgets and all the methods of EVT_* class objects), so if you have questions there, I can probably guide you.
Well, Thank you for the offer.
I myself have gotton to know wxPython quite well.
My problem is that I know wxPython 2.6 > better than I know wxPython 2.4
And the same with Python 2.4 > better than Python 2.3
Jan 10 '07 #5
bartonc
6,596 Expert 4TB
Well, Thank you for the offer.
I myself have gotton to know wxPython quite well.
My problem is that I know wxPython 2.6 > better than I know wxPython 2.4
And the same with Python 2.4 > better than Python 2.3
Sounds like our skill sets may be on about the same level. I've never even tried to to stay 2.3 compatible. It seems like most significant changes took place in 2.2 and maybe now with 2.5 some new syntax has evolved, but I haven't really checked it out too much.
Jan 10 '07 #6
Sounds like our skill sets may be on about the same level. I've never even tried to to stay 2.3 compatible. It seems like most significant changes took place in 2.2 and maybe now with 2.5 some new syntax has evolved, but I haven't really checked it out too much.
Exactly, I have the same problem.
I am forced though to still use Python 2.3 and Python 2.4
I get an error with SetStringSelection.
[ERROR] wxPython.wxc.wxPyAssertionError
C++ assertion "wxAssertFailure" failed in ../src/common/lboxcmn.cpp(81): invalid string in SetStringSelection [/ERROR]
Expand|Select|Wrap|Line Numbers
  1.  self.R.SetStringSelection(rol 
)
Jan 10 '07 #7
bartonc
6,596 Expert 4TB
Exactly, I have the same problem.
I am forced though to still use Python 2.3 and Python 2.4
I get an error with SetStringSelection.
[ERROR] wxPython.wxc.wxPyAssertionError
C++ assertion "wxAssertFailure" failed in ../src/common/lboxcmn.cpp(81): invalid string in SetStringSelection [/ERROR]
Expand|Select|Wrap|Line Numbers
  1.  self.R.SetStringSelection(rol 
)
This does not look like a python error (or version problem). Your wxPython version may be out of sink with wxWidgets installed. Post enough code to run and I'll try to run it to see if I get the same error. I am currnetly using Py2.4.4 because of current MySQL support.
Jan 10 '07 #8
This does not look like a python error (or version problem). Your wxPython version may be out of sink with wxWidgets installed. Post enough code to run and I'll try to run it to see if I get the same error. I am currnetly using Py2.4.4 because of current MySQL support.
What I haven't mensioned is that the application I am working on is very big, 1 Gb of code.
Keeping that in mind, you can understand that there is a lot of imports depending on each other, sending you enough code, isn't quite possible
But the good news is that I think I found my problem. A wxWidget problem.
Thank you so much for your help
Jan 10 '07 #9
bartonc
6,596 Expert 4TB
What I haven't mensioned is that the application I am working on is very big, 1 Gb of code.
Keeping that in mind, you can understand that there is a lot of imports depending on each other, sending you enough code, isn't quite possible
But the good news is that I think I found my problem. A wxWidget problem.
Thank you so much for your help
OK, here's the plan: Make a simpleApp with enough code to produce the error on your machine. Then start a new discussion and post your simpleApp there and I'll run it. We should be targeting the wx installation since that is what the error looks like to me.
Jan 10 '07 #10
OK, here's the plan: Make a simpleApp with enough code to produce the error on your machine. Then start a new discussion and post you simpleApp there and I'll run it. We should be targeting the wx installation since that is what the error looks like to me.
You are fast, I am about to do it, then you can have a look at it
Thanx a lot
That's the kind of errors that appear when you feel you want to change widgets a little (referencing to me)
Jan 10 '07 #11
This does not look like a python error (or version problem). Your wxPython version may be out of sink with wxWidgets installed. Post enough code to run and I'll try to run it to see if I get the same error. I am currnetly using Py2.4.4 because of current MySQL support.
Hi, there, just by the way, I found my fault
It was a wx.Choice problem. In wxPython 2.4, wxChoice takes the first choice as the default, but in wxPython 2.6, it doesn't do that anymore. So after writing a little method, I got it right, thanx
Jan 12 '07 #12
bartonc
6,596 Expert 4TB
Hi, there, just by the way, I found my fault
It was a wx.Choice problem. In wxPython 2.4, wxChoice takes the first choice as the default, but in wxPython 2.6, it doesn't do that anymore. So after writing a little method, I got it right, thanx
Thanks for the update. I'm sure that this will help somebody down the road.
Jan 12 '07 #13
For anyone who cares, I found one more change which I think would be a great help to anyone. In Python 2.3 a boolean (ie True, False) could be either a bool or an integer( ex. If you said True, but the program expects an integer, it automatically takes it as 1) In 2.4 however, it doesn't do that anymore, you would have to say int(boolvariable) eg int(True) will give you 1 but True will give you True
Just something for thought,
Jan 16 '07 #14
bartonc
6,596 Expert 4TB
For anyone who cares, I found one more change which I think would be a great help to anyone. In Python 2.3 a boolean (ie True, False) could be either a bool or an integer( ex. If you said True, but the program expects an integer, it automatically takes it as 1) In 2.4 however, it doesn't do that anymore, you would have to say int(boolvariable) eg int(True) will give you 1 but True will give you True
Just something for thought,
If that's true, then this shouldn't work in 2.4.4:

>>> 1 + True
2
>>>
but it does. It's all about the context.
Jan 16 '07 #15
If that's true, then this shouldn't work in 2.4.4:
Obviously it depends on the context, but it is just safer to imply int(True).
In more complex cases and in Combination with wxPython,it is a much better practice.
This is only what I experienced.
Jan 17 '07 #16
bartonc
6,596 Expert 4TB
Obviously it depends on the context, but it is just safer to imply int(True).
In more complex cases and in Combination with wxPython,it is a much better practice.
This is only what I experienced.
The truth is that bool is a subtype of integer, and so inherits integer operations from there.

Integers
These represent elements from the mathematical set of integers (positive and negative).
There are three types of integers:


Plain integers
These represent numbers in the range -2147483648 through 2147483647. (The range may be larger on machines with a larger natural word size, but not smaller.) When the result of an operation would fall outside this range, the result is normally returned as a long integer (in some cases, the exception OverflowError is raised instead). For the purpose of shift and mask operations, integers are assumed to have a binary, 2's complement notation using 32 or more bits, and hiding no bits from the user (i.e., all 4294967296 different bit patterns correspond to different values).

Long integers
These represent numbers in an unlimited range, subject to available (virtual) memory only. For the purpose of shift and mask operations, a binary representation is assumed, and negative numbers are represented in a variant of 2's complement which gives the illusion of an infinite string of sign bits extending to the left.

Booleans
These represent the truth values False and True. The two objects representing the values False and True are the only Boolean objects. The Boolean type is a subtype of plain integers, and Boolean values behave like the values 0 and 1, respectively, in almost all contexts, the exception being that when converted to a string, the strings "False" or "True" are returned, respectively.
Jan 17 '07 #17
The truth is that bool is a subtype of integer, and so inherits integer operations from there.
The truth is that I got that error and that is what happened.
I believe your facts, but like I said, I got that error
"Invalid type True" when I needed to get 1
It is a very important little difference when you need to generate XML
It is just an intresting little thing I found I needed to watch out for
Jan 17 '07 #18
bartonc
6,596 Expert 4TB
The truth is that I got that error and that is what happened.
I believe your facts, but like I said, I got that error
"Invalid type True" when I needed to get 1
It is a very important little difference when you need to generate XML
It is just an intresting little thing I found I needed to watch out for
So true! I get a lot of this type of thing (type casting) when dealing with SQL. It's interesting that an earlier version of python treated this differently. I wonder if it is the particular library that you are dealing with or the interpreter itself. I would tend to bet on the former.
Jan 17 '07 #19
So true! I get a lot of this type of thing (type casting) when dealing with SQL. It's interesting that an earlier version of python treated this differently. I wonder if it is the particular library that you are dealing with or the interpreter itself. I would tend to bet on the former.
It's interesting, but annoying. Why change that?
I think it is the library,as well. I't is annoying if it works fine on the one version and gives an error on the other. Normally it isn't big errors, but it is not easy to find, especially if you (in my case) generate XML to use in another module and the error appear there. Hard to trace
Jan 17 '07 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Emile van Sebille | last post by:
QOTW: "If we get 2.3.3c1 out in early December, we could release 2.3.3 final before the end of the year, and start 2004 with a 100% bug-free codebase <wink>." -- Tim Peters "cjOr proWe vbCould...
0
by: Emile van Sebille | last post by:
QOTW: "Have you ever used the copy module? I am *not* a beginner, and have used it *once* (and I can't remember what for, either)." -- Michael Hudson "It will likely take a little practice...
0
by: Emile van Sebille | last post by:
QOTW (in the OS agnostic category): "There is a (very popular) Python package out there which exposes the win32 api. I'm not sure what it's called. (win32api? pythonwin? win32all?)" -- Francis...
1
by: Raghu | last post by:
Hello all, I need small help regarding the diffrences of .obj files . what is the difference in the .obj files in the following two cases apart from teh names of the variables and functions?...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.