21 while data[self.idx] in [';','\n','\r', '\a', ' ']: |
21 while data[self.idx] in [';','\n','\r', '\a', ' ']: |
22 self.idx += 1 |
22 self.idx += 1 |
23 if data[self.idx] == chr(0x03): |
23 if data[self.idx] == chr(0x03): |
24 self.ESC() |
24 self.ESC() |
25 else: |
25 else: |
26 cmd = data[self.idx: self.idx+2] |
26 cmd = data[self.idx: self.idx+2].upper() |
27 self.idx += 2 |
27 self.idx += 2 |
28 getattr(self, cmd)() |
28 getattr(self, cmd)() |
29 while self.idx<len(data) and data[self.idx] in [';','\n','\r', '\a', ' ']: |
29 while self.idx<len(data) and data[self.idx] in [';','\n','\r', '\a', ' ']: |
30 self.idx += 1 |
30 self.idx += 1 |
31 |
31 |