[Python-checkins] CVS: python/dist/src/Lib cmd.py,1.21,1.22
Eric S. Raymond
esr@users.sourceforge.net
Thu, 08 Feb 2001 20:52:13 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv3082
Modified Files:
cmd.py
Log Message:
String method conversion.
Index: cmd.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cmd.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** cmd.py 2001/01/26 17:15:18 1.21
--- cmd.py 2001/02/09 04:52:11 1.22
***************
*** 92,96 ****
def onecmd(self, line):
! line = string.strip(line)
if not line:
return self.emptyline()
--- 92,96 ----
def onecmd(self, line):
! line = line.strip()
if not line:
return self.emptyline()
***************
*** 105,109 ****
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:])
if cmd == '':
return self.default(line)
--- 105,109 ----
i, n = 0, len(line)
while i < n and line[i] in self.identchars: i = i+1
! cmd, arg = line[:i], line[i:].strip()
if cmd == '':
return self.default(line)