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