summaryrefslogtreecommitdiffstats
path: root/Lib/telnetlib.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 07:10:12 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 07:10:12 (GMT)
commit6b8c52835c7dae1d686fd46fda1614b199de3ece (patch)
treeba80aa64533fdd6eaf77043f55fcbf97d5eda5d1 /Lib/telnetlib.py
parent909bc1cf6322df3edff9c34c1cef96f58b8c5a7b (diff)
downloadcpython-6b8c52835c7dae1d686fd46fda1614b199de3ece.zip
cpython-6b8c52835c7dae1d686fd46fda1614b199de3ece.tar.gz
cpython-6b8c52835c7dae1d686fd46fda1614b199de3ece.tar.bz2
String method conversion.
Diffstat (limited to 'Lib/telnetlib.py')
-rw-r--r--Lib/telnetlib.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index d2d0b9b..231618a 100644
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -40,7 +40,6 @@ To do:
import sys
import socket
import select
-import string
# Tunable parameters
DEBUGLEVEL = 0
@@ -187,7 +186,7 @@ class Telnet:
"""
if IAC in buffer:
- buffer = string.replace(buffer, IAC, IAC+IAC)
+ buffer = buffer.replace(IAC, IAC+IAC)
self.msg("send %s", `buffer`)
self.sock.send(buffer)
@@ -201,7 +200,7 @@ class Telnet:
"""
n = len(match)
self.process_rawq()
- i = string.find(self.cookedq, match)
+ i = self.cookedq.find(match)
if i >= 0:
i = i+n
buf = self.cookedq[:i]
@@ -215,7 +214,7 @@ class Telnet:
i = max(0, len(self.cookedq)-n)
self.fill_rawq()
self.process_rawq()
- i = string.find(self.cookedq, match, i)
+ i = self.cookedq.find(match, i)
if i >= 0:
i = i+n
buf = self.cookedq[:i]