try: StringType = basestring except: StringType = str