(s)
| 208 | |
| 209 | |
| 210 | def TranslateToGnChars(s): |
| 211 | for code in s.encode('utf-8'): |
| 212 | if code in (34, 36, 92): # For '"', '$', or '\\'. |
| 213 | yield '\\' + chr(code) |
| 214 | elif 32 <= code < 127: |
| 215 | yield chr(code) |
| 216 | else: |
| 217 | yield '$0x%02X' % code |
| 218 | |
| 219 | |
| 220 | def LoadPythonDictionary(path): |
no test coverage detected