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

Method do_printenv

pjl.py:397–408  ·  view source on GitHub ↗

Show printer environment variable: printenv

(self, arg)

Source from the content-addressed store, hash-verified

395
396 # ------------------------[ printenv <variable> ]---------------------
397 def do_printenv(self, arg):
398 "Show printer environment variable: printenv <VAR>"
399 str_recv = self.cmd("@PJL INFO VARIABLES")
400 variables = []
401 for item in str_recv.splitlines():
402 var = re.findall("^(.*)=", item)
403 if var:
404 variables += var
405 self.options_printenv = variables
406 match = re.findall("^(" + re.escape(arg) + ".*)\s+\[", item, re.I)
407 if match:
408 output().info(match[0])
409
410 options_printenv = []
411

Callers

nothing calls this directly

Calls 4

cmdMethod · 0.95
outputClass · 0.90
escapeMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected