projects
/
rainbowstream.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
include dm in timeline
[rainbowstream.git]
/
rainbowstream
/
py3patch.py
diff --git
a/rainbowstream/py3patch.py
b/rainbowstream/py3patch.py
index 543b9a1462a27ef2fb5cb7100058159654b32ea4..6dc213fdf084d92ca029c14b0ac487f7ecfb9c7f 100644
(file)
--- a/
rainbowstream/py3patch.py
+++ b/
rainbowstream/py3patch.py
@@
-9,11
+9,16
@@
try:
except:
from io import StringIO, BytesIO
except:
from io import StringIO, BytesIO
+# HTMLParser module
+try:
+ from HTMLParser import HTMLParser
+ unescape = HTMLParser().unescape
+except:
+ from html import unescape
+
# raw_input and map functiion behaviour
# raw_input and map functiion behaviour
-if sys.version[0]
=="3":
+if sys.version[0]
== "3":
raw_input = input
raw_input = input
- lmap = lambda f,
a: list(map(f,
a))
+ lmap = lambda f,
a: list(map(f,
a))
else:
else:
- lmap = lambda f,a: map(f,a)
-
-
+ lmap = lambda f, a: map(f, a)