(self, arg)
| 1084 | |
| 1085 | # ------------------------[ config <setting> ]------------------------ |
| 1086 | def do_config(self, arg): |
| 1087 | arg = re.split("\s+", arg, 1) |
| 1088 | (arg, val) = tuple(arg) if len(arg) > 1 else (arg[0], None) |
| 1089 | if arg in list(self.options_config.keys()): |
| 1090 | key = self.options_config[arg] |
| 1091 | if arg == 'copies' and not val: |
| 1092 | return self.help_config() |
| 1093 | output().psonly() |
| 1094 | val = val or 'currentpagedevice /' + key + ' get not' |
| 1095 | output().info(self.globalcmd( |
| 1096 | 'currentpagedevice /' + key + ' known\n' |
| 1097 | '{<< /' + key + ' ' + val + ' >> setpagedevice\n' |
| 1098 | '(' + key + ' ) print currentpagedevice /' + key + ' get\n' |
| 1099 | 'dup type /integertype eq {(= ) print 8 string cvs print}\n' |
| 1100 | '{{(enabled)}{(disabled)} ifelse print} ifelse}\n' |
| 1101 | '{(Not available) print} ifelse')) |
| 1102 | else: |
| 1103 | self.help_config() |
| 1104 | |
| 1105 | def help_config(self): |
| 1106 | print("Change printer settings: config <setting>") |
nothing calls this directly
no test coverage detected