Eats event if key not in digits

def OnChar(self, event):
        """Eats event if key not in digits"""

        key = event.GetKeyCode()

        if key < wx.WXK_SPACE or key == wx.WXK_DELETE or key > 255 or \
           chr(key) in string.digits:
            event.Skip()