def _formatPartialContent(value):
 if (value and isinstance(value, basestring)):
  try:
   value = hexdecode(value)
  except:
   pass
  finally:
   value = safecharencode(value)
 return value

def _formatPartialContent ( value ) : if ( value and isinstance ( value , basestring ) ) : try : value = hexdecode ( value ) except : pass finally : value = safecharencode ( value ) return value
prepares partial content for safe console output .