def is_text_string(obj):
if PY2:<EOL><INDENT>return isinstance(obj, basestring)<EOL><DEDENT>else:<EOL><INDENT>return isinstance(obj, str)<EOL><DEDENT>
Return True if `obj` is a text string, False if it is anything else,
    like binary data (Python 3) or QString (Python 2, PyQt API #1)