summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-15 04:32:56 (GMT)
committerFred Drake <fdrake@acm.org>2000-09-15 04:32:56 (GMT)
commit10515b6483b622625838b3636dbb442097bfe7ef (patch)
treef46f8cf8155bf0064e89344df7830672761db055 /Tools
parent81c1735809f55a876b8a821a7b9646304afca675 (diff)
downloadcpython-10515b6483b622625838b3636dbb442097bfe7ef.zip
cpython-10515b6483b622625838b3636dbb442097bfe7ef.tar.gz
cpython-10515b6483b622625838b3636dbb442097bfe7ef.tar.bz2
main(): Move hackery of sys.argv until after the Tk instance has been
created. This allows the application-specific Tkinter initialization to be executed if present. Also pass an explicit className parameter to the Tk() constructor. This closes SourceForge bug #110618.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/idle/PyShell.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/idle/PyShell.py b/Tools/idle/PyShell.py
index 0bdb059..06d4f15 100644
--- a/Tools/idle/PyShell.py
+++ b/Tools/idle/PyShell.py
@@ -712,12 +712,6 @@ def main():
if o == '-t':
PyShell.shell_title = a
- if not edit:
- if cmd:
- sys.argv = ["-c"] + args
- else:
- sys.argv = args or [""]
-
for i in range(len(sys.path)):
sys.path[i] = os.path.abspath(sys.path[i])
@@ -735,7 +729,7 @@ def main():
sys.path.insert(0, dir)
global flist, root
- root = Tk()
+ root = Tk(className="Idle")
fixwordbreaks(root)
root.withdraw()
flist = PyShellFileList(root)
@@ -743,6 +737,12 @@ def main():
if edit:
for filename in args:
flist.open(filename)
+ else:
+ if cmd:
+ sys.argv = ["-c"] + args
+ else:
+ sys.argv = args or [""]
+
shell = PyShell(flist)
interp = shell.interp