MCPcopy Index your code
hub / github.com/RUB-NDS/PRET / do_disable

Method do_disable

postscript.py:481–492  ·  view source on GitHub ↗
(self, arg)

Source from the content-addressed store, hash-verified

479
480 # ------------------------[ disable ]---------------------------------
481 def do_disable(self, arg):
482 output().psonly()
483 before = 'true' in self.globalcmd('userdict /showpage known dup ==\n'
484 '{userdict /showpage undef}\n'
485 '{/showpage {} def} ifelse')
486 after = 'true' in self.cmd('userdict /showpage known ==')
487 if before == after:
488 output().info("Not available") # no change
489 elif before:
490 output().info("Printing is now enabled")
491 elif after:
492 output().info("Printing is now disabled")
493
494 # define alias but do not show alias in help
495 do_enable = do_disable

Callers

nothing calls this directly

Calls 5

globalcmdMethod · 0.95
cmdMethod · 0.95
outputClass · 0.90
psonlyMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected