py: Detect unmatched tripple quote in repl helper.