resolved StringIO issue for python3.3