37,720
社区成员
发帖
与我相关
我的任务
分享
如果你用的是wxPython, 1、获取值wx.TextCtrl.GetValue; 2、解析字符串,这个方法我记得数据结构的书上有,找找看。
$ python
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> gotstr = '11+(3*8)'
>>> eval(gotstr)
35
>>>