(Tkinter.py): Improve application basename determination to make .py and
.pyc extensions completely equivelent when locating the "profile" which should be read on startup.
This commit is contained in:
parent
4be63d1725
commit
cab3c3b8d4
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue