wx文本输入输出解决问题

wx文本输入输出解决问题

在wxpython  里面默认的框提取出来的都是字符串模式的吧?
        a=wx.FindWindowById(wxID_FRAME1TEXTCTRL1,self).GetValue()
        b=wx.FindWindowById(wxID_FRAME1TEXTCTRL2,self).GetValue()
        c=wx.FindWindowById(wxID_FRAME1TEXTCTRL3,self).GetValue()
        d=wx.FindWindowById(wxID_FRAME1TEXTCTRL4,self).GetValue()
        e=wx.FindWindowById(wxID_FRAME1TEXTCTRL5,self).GetValue()
        h1=string.atoi(a)
        h2=string.atoi(b)
        h4=string.atoi(d)
        h3=c.split()
        h6=map(float,h3)
        h5=e.split()
        h7=map(float,h5)

我这段代码运行老是显示有错.
提示h1=string.atoi(a)这行有错..我前面也导入string模块了....
帮我看看错哪儿了...现在我一个头两个大了.
File "C:\Documents and Settings\figo\JXCollage\JX.py", line 92, in OnButton1Button
    h4=string.atoi(d)
  File "D:\Python25\lib\string.py", line 401, in atoi
    return _int(s, base)
ValueError: invalid literal for int() with base 10: '0.5'
Traceback (most recent call last):
是因为输入是小数float,引起的错误......
应该用 string.atof