Skip to content

Commit 5b62d17

Browse files
committed
Experimental tkinter.ttk support
1 parent 521477b commit 5b62d17

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

docs/standard_library_imports.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ complete list is here::
6868
from tkinter import scrolledtext
6969
from tkinter import simpledialog
7070
from tkinter import tix
71+
from tkinter import ttk
7172

7273
import winreg # Windows only
7374

src/tkinter/ttk.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from __future__ import absolute_import
2+
3+
from future.utils import PY3
4+
5+
if PY3:
6+
from tkinter.ttk import *
7+
else:
8+
try:
9+
from ttk import *
10+
except ImportError:
11+
raise ImportError('The ttk module is missing. Does your Py2 '
12+
'installation include Tkinter?')
13+

0 commit comments

Comments
 (0)