WxPython versus Tkinter.

Corey Richardson kb1pkl at aim.com
Sun Jan 23 21:07:33 EST 2011


On 01/23/2011 08:28 PM, rantingrick wrote:
> On Jan 23, 6:30 pm, Corey Richardson<kb1... at aim.com>  wrote:
>> On 01/23/2011 07:07 PM, rantingrick wrote:
>>
>>> On Jan 22, 6:07 pm, rantingrick<rantingr... at gmail.com>    wrote:
>>
>>>> I await any challengers...
>>
>>> WxPython Challenge 1 code updated...
>>
>>>    * Fixed tab traveral
>>>    * Removed hand-holding code
>>>    * Removed some cruft
>>
>>>     https://sites.google.com/site/thefutureofpython/home/code-challenges
>>
>>> Good luck!
>>
>> Still doesn't fix the problem of the code not working on Linux boxes.
>> Maybe wxPython isn't the best option, it doesn't appear very cross-platform.
>> Still getting:
>>
>> Loading Images:
>>    -- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/file.bmp, file.bmp
>>    -- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/folder.bmp, folder.bmp
>>    -- /home/corey/Downloads/Wx_Tk_Challenge/Bitmaps/link.bmp, link.bmp
>> imageMap.keys ->  ['folder', 'link', 'file']
>> Segmentation fault
>
> Have you tried any debugging? Maybe Linux has some specific needs and
> NOT wxPython. Stop jumping to conclusions.


Python (and supposedly wxPython) are cross-platform. Code that runs on 
one should run on the other unmodified. This is obviously not the case.

Line 151 fails (determined from a simple binary search using print 
statements):

index = self.InsertImageStringItem(sys.maxint, name, imageIdx)

Maybe wxPython (really wxwidgets, python doesn't throw segfaults...that 
I've ever seen) isn't suited for the stdlib, unless this is a just a 
really silly bug somewhere in your programming (which I doubt it is).
Looks like an issue with the method, because imageIdx is just a 
dictionary, sys.maxint is a (surprise!) integer, and name is a string.



More information about the Python-list mailing list