summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2006-07-24 17:13:23 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2006-07-24 17:13:23 (GMT)
commitb3c4d16e688d073dae92f272d66b6efa4b70a734 (patch)
tree5cd1236555b3c8831882b6221dd6700d99a46eae
parentc13c34c39d0a39b3f3bfe1d2145861dbdc19dd68 (diff)
downloadcpython-b3c4d16e688d073dae92f272d66b6efa4b70a734.zip
cpython-b3c4d16e688d073dae92f272d66b6efa4b70a734.tar.gz
cpython-b3c4d16e688d073dae92f272d66b6efa4b70a734.tar.bz2
EditorWindow failed when used stand-alone if sys.ps1 not set.
Bug 1010370 Dave Florek M EditorWindow.py M PyShell.py M NEWS.txt
-rw-r--r--Lib/idlelib/EditorWindow.py4
-rw-r--r--Lib/idlelib/NEWS.txt3
-rw-r--r--Lib/idlelib/PyShell.py4
3 files changed, 7 insertions, 4 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 442d718..397d12e 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 5ea5b0e..ba624e5 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 f7622f1..227372e 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1306,10 +1306,6 @@ def main():
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:
sys.stderr.write("Error: %s\n" % str(msg))