add documents
[rainbowstream.git] / rainbowstream / py3patch.py
1 """
2 Python 3 supports
3 """
4 import sys
5
6 # StringIO module
7 try:
8 from StringIO import StringIO, BytesIO
9 except:
10 from io import StringIO, BytesIO
11
12 # raw_input and map functiion behaviour
13 if sys.version[0] == "3":
14 raw_input = input
15 lmap = lambda f, a: list(map(f, a))
16 else:
17 lmap = lambda f, a: map(f, a)