diff options
author | Fred Drake <fdrake@acm.org> | 1996-10-06 17:55:20 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1996-10-06 17:55:20 (GMT) |
commit | cab3c3b8d4e376d5d8f4d23b0e805397d359f206 (patch) | |
tree | 80204b21a1e87b6b4deb1d5991f6fb0a342fcf16 /Lib/lib-tk | |
parent | 4be63d17255b590bad8d80b564a717995f2ee3f3 (diff) | |
download | cpython-cab3c3b8d4e376d5d8f4d23b0e805397d359f206.zip cpython-cab3c3b8d4e376d5d8f4d23b0e805397d359f206.tar.gz cpython-cab3c3b8d4e376d5d8f4d23b0e805397d359f206.tar.bz2 |
(Tkinter.py): Improve application basename determination to make .py and
.pyc extensions completely equivelent when locating the "profile"
which should be read on startup.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index cd341dd..13886eb 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -638,7 +638,8 @@ class Tk(Misc, Wm): if baseName is None: import sys, os baseName = os.path.basename(sys.argv[0]) - if baseName[-3:] == '.py': baseName = baseName[:-3] + baseName, ext = os.path.splitext(baseName) + if ext not in ('.py', 'pyc'): baseName = baseName + ext self.tk = tkinter.create(screenName, baseName, className) try: # Disable event scanning except for Command-Period |