MCPcopy
hub / github.com/RUB-NDS/PRET / do_set

Method do_set

pjl.py:426–443  ·  view source on GitHub ↗

Set printer environment variable: set

(self, arg, fb=True)

Source from the content-addressed store, hash-verified

424
425 # ------------------------[ set ]-------------------------------------
426 def do_set(self, arg, fb=True):
427 "Set printer environment variable: set <VAR=VALUE>"
428 if not arg:
429 arg = eval(input("Set variable (VAR=VALUE): "))
430 self.cmd(
431 "@PJL SET SERVICEMODE=HPBOISEID"
432 + c.EOL
433 + "@PJL DEFAULT "
434 + arg
435 + c.EOL
436 + "@PJL SET "
437 + arg
438 + c.EOL
439 + "@PJL SET SERVICEMODE=EXIT",
440 False,
441 )
442 if fb:
443 self.onecmd("printenv " + re.split("=", arg, 1)[0])
444
445 # ------------------------[ pagecount <number> ]----------------------
446 def do_pagecount(self, arg):

Callers 4

do_pagecountMethod · 0.95
do_disableMethod · 0.95
do_destroyMethod · 0.95
do_holdMethod · 0.95

Calls 2

cmdMethod · 0.95
onecmdMethod · 0.80

Tested by

no test coverage detected