From b3c4d16e688d073dae92f272d66b6efa4b70a734 Mon Sep 17 00:00:00 2001 From: "Kurt B. Kaiser" Date: Mon, 24 Jul 2006 17:13:23 +0000 Subject: [PATCH] EditorWindow failed when used stand-alone if sys.ps1 not set. Bug 1010370 Dave Florek M EditorWindow.py M PyShell.py M NEWS.txt --- Lib/idlelib/EditorWindow.py | 4 ++++ Lib/idlelib/NEWS.txt | 3 +++ Lib/idlelib/PyShell.py | 4 ---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 442d7187f52..397d12e0e93 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -85,6 +85,10 @@ class EditorWindow(object): self.flist = flist root = root or flist.root self.root = root + try: + sys.ps1 + except AttributeError: + sys.ps1 = '>>> ' self.menubar = Menu(root) self.top = top = WindowList.ListedToplevel(root, menu=self.menubar) if flist: diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 5ea5b0e7027..ba624e57d0a 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ What's New in IDLE 1.2c1? *Release date: XX-XXX-2006* +- EditorWindow failed when used stand-alone if sys.ps1 not set. + Bug 1010370 Dave Florek + - Tooltips failed on new-syle class __init__ args. Bug 1027566 Loren Guthrie - Avoid occasional failure to detect closing paren properly. diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index f7622f14f9a..227372ef2a7 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -1305,10 +1305,6 @@ def main(): cmd = None script = None startup = False - try: - sys.ps1 - except AttributeError: - sys.ps1 = '>>> ' try: opts, args = getopt.getopt(sys.argv[1:], "c:deihnr:st:") except getopt.error, msg: