Kaydet (Commit) cab3c3b8 authored tarafından Fred Drake's avatar Fred Drake

(Tkinter.py): Improve application basename determination to make .py and

	.pyc extensions completely equivelent when locating the "profile"
	which should be read on startup.
üst 4be63d17
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment