Use string.replace instead of regsub.[g]sub.

This commit is contained in:
Guido van Rossum 1997-12-24 21:18:41 +00:00
parent b9b50eb7e0
commit 00f9fea288
5 changed files with 13 additions and 17 deletions

View file

@ -38,7 +38,6 @@
import socket
import select
import string
import regsub
# Tunable parameters
DEBUGLEVEL = 0
@ -185,7 +184,7 @@ def write(self, buffer):
"""
if IAC in buffer:
buffer = regsub.gsub(IAC, IAC+IAC, buffer)
buffer = string.replace(buffer, IAC, IAC+IAC)
self.sock.send(buffer)
def read_until(self, match, timeout=None):