try: from StringIO import StringIO except ImportError: from io import StringIO 转载于:https://www.cnblogs.com/dengyg200891/p/8078762.html