Skip to content

Commit 5cd9587

Browse files
committed
Add more underscore-prefixed imports to tkinter (issue #233)
1 parent a6ed514 commit 5cd9587

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/future/moves/tkinter/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
if not PY3:
66
from Tkinter import *
7-
from Tkinter import _flatten, _cnfmerge
7+
from Tkinter import (_cnfmerge, _default_root, _flatten, _join, _setit,
8+
_splitdict, _stringify, _support_default_root, _test,
9+
_tkinter)
810
else:
911
from tkinter import *

src/tkinter/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
if sys.version_info[0] < 3:
55
from Tkinter import *
6-
from Tkinter import _flatten, _cnfmerge
6+
from Tkinter import (_cnfmerge, _default_root, _flatten, _join, _setit,
7+
_splitdict, _stringify, _support_default_root, _test,
8+
_tkinter)
79
else:
810
raise ImportError('This package should not be accessible on Python 3. '
911
'Either you are trying to run from the python-future src folder '

src/tkinter/filedialog.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
except ImportError:
1111
raise ImportError('The FileDialog module is missing. Does your Py2 '
1212
'installation include tkinter?')
13-
13+
try:
14+
from tkFileDialog import *
15+
except ImportError:
16+
raise ImportError('The tkFileDialog module is missing. Does your Py2 '
17+
'installation include tkinter?')

0 commit comments

Comments
 (0)