diff options
author | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 +0000 |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 +0000 |
commit | aaab30e00cc3e8d90c71b8657c284feeb4ac1413 (patch) | |
tree | d055e0bd374770014d9afdff1b961418b1828584 /Tools/idle/PyShell.py | |
parent | 6a0477b099560a452e37fe77c3850bf232487c16 (diff) | |
download | cpython-git-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.gz |
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)
This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
Diffstat (limited to 'Tools/idle/PyShell.py')
-rw-r--r-- | Tools/idle/PyShell.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/idle/PyShell.py b/Tools/idle/PyShell.py index e71a9a17a5..7fd28eba21 100644 --- a/Tools/idle/PyShell.py +++ b/Tools/idle/PyShell.py @@ -208,7 +208,7 @@ class ModifiedInterpreter(InteractiveInterpreter): # Stuff source in the filename cache filename = "<pyshell#%d>" % self.gid self.gid = self.gid + 1 - lines = string.split(source, "\n") + lines = source.split("\n") linecache.cache[filename] = len(source)+1, 0, lines, filename return filename @@ -582,7 +582,7 @@ class PyShell(OutputWindow): # If we're in the current input and there's only whitespace # beyond the cursor, erase that whitespace first s = self.text.get("insert", "end-1c") - if s and not string.strip(s): + if s and not s.strip(): self.text.delete("insert", "end-1c") # If we're in the current input before its last line, # insert a newline right at the insert point |