diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 11:51:27 (GMT) |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 11:51:27 (GMT) |
commit | fc170b1fd5db978f4e8d4c23c138a7b59df681ec (patch) | |
tree | 3c73ffcba8f5ece8c64a086a362b7fbe65368048 /Lib/lib-tk/tkSimpleDialog.py | |
parent | d8c628bd59f70b5389c39fd9e6a15cb3e2d46f27 (diff) | |
download | cpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.zip cpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.tar.gz cpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.tar.bz2 |
String method conversion.
Diffstat (limited to 'Lib/lib-tk/tkSimpleDialog.py')
-rw-r--r-- | Lib/lib-tk/tkSimpleDialog.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py index 0dc5c84..15ff544 100644 --- a/Lib/lib-tk/tkSimpleDialog.py +++ b/Lib/lib-tk/tkSimpleDialog.py @@ -157,8 +157,6 @@ class Dialog(Toplevel): # -------------------------------------------------------------------- # convenience dialogues -import string - class _QueryDialog(Dialog): def __init__(self, title, prompt, @@ -236,7 +234,7 @@ class _QueryDialog(Dialog): class _QueryInteger(_QueryDialog): errormessage = "Not an integer." def getresult(self): - return string.atoi(self.entry.get()) + return int(self.entry.get()) def askinteger(title, prompt, **kw): '''get an integer from the user @@ -255,7 +253,7 @@ def askinteger(title, prompt, **kw): class _QueryFloat(_QueryDialog): errormessage = "Not a floating point value." def getresult(self): - return string.atof(self.entry.get()) + return float(self.entry.get()) def askfloat(title, prompt, **kw): '''get a float from the user |