def _StrOrUnicode(value):
 try:
  return str(value)
 except UnicodeEncodeError:
  return unicode(value)

def _StrOrUnicode ( value ) : try : return str ( value ) except UnicodeEncodeError : return unicode ( value )
converts value to a python string or .