(self, s)
| 2731 | return "#" + "".join(["%02x" % float2int(c) for c in (r, g, b)]) |
| 2732 | |
| 2733 | def escape(self, s): |
| 2734 | #s = s.encode('utf-8') |
| 2735 | s = s.replace('\\', r'\\') |
| 2736 | s = s.replace('\n', r'\n') |
| 2737 | s = s.replace('\t', r'\t') |
| 2738 | s = s.replace('"', r'\"') |
| 2739 | return '"' + s + '"' |
| 2740 | |
| 2741 | def write(self, s): |
| 2742 | self.fp.write(s) |
no test coverage detected