Show printer environment variable: printenv
(self, arg)
| 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 |