try: STRING_TYPE = basestring except NameError: # Python 3 STRING_TYPE = str # vim: ai sts=4 et sw=4