convertToPythonDoc returns a trimmed string
debugging support