]> granicus.if.org Git - python/commitdiff
Tk.__init__(): In computing baseName, add ".pyo" to list of dropped
authorFred Drake <fdrake@acm.org>
Wed, 15 Jul 1998 04:36:56 +0000 (04:36 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 15 Jul 1998 04:36:56 +0000 (04:36 +0000)
extensions, and include the "." in ".pyc".  Still need to get
_tkinter.c:Tkapp_New() to use baseName....

Lib/lib-tk/Tkinter.py

index 3a7b8c0397ee0c5fb0c957639036d4e49a02ab29..523db9e5cf0062690ce9bc1e084e69ec5c711dca 100644 (file)
@@ -867,7 +867,8 @@ class Tk(Misc, Wm):
                        import sys, os
                        baseName = os.path.basename(sys.argv[0])
                        baseName, ext = os.path.splitext(baseName)
-                       if ext not in ('.py', 'pyc'): baseName = baseName + ext
+                       if ext not in ('.py', '.pyc', '.pyo'):
+                               baseName = baseName + ext
                self.tk = _tkinter.create(screenName, baseName, className)
                if _MacOS:
                        # Disable event scanning except for Command-Period