Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ebb4190

Browse files
committed
Use string methods, remove import string
1 parent ab19962 commit ebb4190

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Lib/lib-tk/Tix.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
# appreciate the advantages.
2727
#
2828

29-
import string
3029
from Tkinter import *
3130
from Tkinter import _flatten, _cnfmerge, _default_root
3231

@@ -35,7 +34,7 @@
3534
raise ImportError, "This version of Tix.py requires Tk 4.0 or higher"
3635

3736
import _tkinter # If this fails your Python may not be configured for Tk
38-
# TixVersion = string.atof(tkinter.TIX_VERSION) # If this fails your Python may not be configured for Tix
37+
# TixVersion = float(tkinter.TIX_VERSION) # If this fails your Python may not be configured for Tix
3938
# WARNING - TixVersion is a limited precision floating point number
4039

4140
# Some more constants (for consistency with Tkinter)
@@ -391,7 +390,7 @@ def __init__(self, master, name,
391390
path = master._subwidget_name(name)
392391
try:
393392
path = path[len(master._w)+1:]
394-
plist = string.splitfields(path, '.')
393+
plist = path.split('.')
395394
except:
396395
plist = []
397396

@@ -402,7 +401,7 @@ def __init__(self, master, name,
402401
# Ensure that the intermediate widgets exist
403402
parent = master
404403
for i in range(len(plist) - 1):
405-
n = string.joinfields(plist[:i+1], '.')
404+
n = '.'.join(plist[:i+1])
406405
try:
407406
w = master._nametowidget(n)
408407
parent = w

0 commit comments

Comments
 (0)