From: Eric S. Raymond Date: Fri, 9 Feb 2001 04:52:11 +0000 (+0000) Subject: String method conversion. X-Git-Tag: v2.1b1~489 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20e4423adef209d2260fd952533dc2360e2d257e;p=python String method conversion. --- diff --git a/Lib/cmd.py b/Lib/cmd.py index 2b20f954ea..dcf601f4f2 100644 --- a/Lib/cmd.py +++ b/Lib/cmd.py @@ -91,7 +91,7 @@ class Cmd: pass def onecmd(self, line): - line = string.strip(line) + line = line.strip() if not line: return self.emptyline() elif line[0] == '?': @@ -104,7 +104,7 @@ class Cmd: self.lastcmd = line i, n = 0, len(line) while i < n and line[i] in self.identchars: i = i+1 - cmd, arg = line[:i], string.strip(line[i:]) + cmd, arg = line[:i], line[i:].strip() if cmd == '': return self.default(line) else: