lib_markup.py
Release/Chat/Libs/lib_markup.py · 570 B
From the archive MUDPyE v0.04.tar.gz
Download the archive « Back to the archive contents
_imports = []
_parents = []
_version = 1
cEsc = "\x01"
cEscSub = "\x02"
cEscProxy = "#"
cEscProxy2 = "##"
cNL = "\n\r"
mxpBegin = cEsc + "t+"
mxpEnd = cEsc + "t-"
mxpAmp = cEsc + "xa"
def Esc(escString):
#Escape Telnet IAC
escString = escString.replace("\xFF", "\xFF\xFF")
#Substitute # for
escString = escString.replace(cEscProxy2, cEscSub)
escString = escString.replace(cEscProxy, cEsc)
return escString.replace(cEscSub, cEscProxy)
def MXPTag(tagBody):
return mxpBegin + tagBody + mxpEnd
def MXPEntity(entityName):
return mxpAmp + entityName + ";"