wchartype: Python module to get full-width (double-byte) character types

When dealing with full-width (especially CJK) characters, you'll often want to know the type of a particular character — Kanji/Hanzi/Hanja, hiragana, katakana, and so on. wchartype is a Python module that will determine the type of a full-width character. The functions all expect Unicode strings of length one. Usage: import wchartype if wchartype.is_asian(u'\u65e5′):     […]

Getting selected items from a ListCtrl in wxPython

I seem to be on a roll with getting selected items from various wxPython controls. This time, I needed to get the selected items from a list control. wx.ListCtrl doesn't have a simple method for getting the selection, but building on this post by Robin Dunn, I was able to cobble my own together using […]

Getting the selected cells from a wxPython grid

Getting the selected cells from a wxPython grid is a little tricky, because you have to use a different method depending on which of the following scenarios applies: A single cell has been selected Multiple cells have been selected via Control+Clicking A range of cells has been selected via dragging The following two functions will […]