| 69 | |
| 70 | # disable printing hard copies of error messages |
| 71 | def on_connect(self, mode): |
| 72 | if mode == 'init': # only for the first connection attempt |
| 73 | str_send = '(x1) = (x2) ==' # = original, == overwritten |
| 74 | str_send += ' << /DoPrintErrors false >> setsystemparams' |
| 75 | str_recv = self.cmd(str_send) |
| 76 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 77 | # handle devices that do not support ps output via 'print' or '==' |
| 78 | if 'x1' in str_recv or self.error: |
| 79 | self.iohack = False # all fine |
| 80 | # hack required to get output (e.g. brother) |
| 81 | elif 'x2' in str_recv: |
| 82 | output().errmsg('Crippled feedback', '%stdout hack enabled') |
| 83 | # busy or not a PS printer or a silent one (e.g. Dell 3110cn) |
| 84 | else: |
| 85 | output().errmsg('No feedback', 'Printer busy, non-ps or silent') |
| 86 | |
| 87 | # ------------------------[ shell ]----------------------------------- |
| 88 | def do_shell(self, arg): |