about previous change

python 3 gave error:  can't use a string pattern on a bytes-like object on 459 ./core.py
Used the power of http://stackoverflow.com/a/21436251