summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/__main__.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-07-27 14:16:32 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-07-27 14:16:32 (GMT)
commitc02cc2707a8ed58896511f7ee151b5509873afc3 (patch)
tree5d1a66a8fc328729bd556ea879b4a99b5ce37ecf /Lib/tkinter/__main__.py
parent5a63183a8b8a9e177f97feac975850df5e6f98aa (diff)
downloadcpython-c02cc2707a8ed58896511f7ee151b5509873afc3.zip
cpython-c02cc2707a8ed58896511f7ee151b5509873afc3.tar.gz
cpython-c02cc2707a8ed58896511f7ee151b5509873afc3.tar.bz2
Issue #9384: python -m tkinter will now display a simple demo applet.
Diffstat (limited to 'Lib/tkinter/__main__.py')
-rw-r--r--Lib/tkinter/__main__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/tkinter/__main__.py b/Lib/tkinter/__main__.py
new file mode 100644
index 0000000..757880d
--- /dev/null
+++ b/Lib/tkinter/__main__.py
@@ -0,0 +1,7 @@
+"""Main entry point"""
+
+import sys
+if sys.argv[0].endswith("__main__.py"):
+ sys.argv[0] = "python -m tkinter"
+from . import _test as main
+main()