| library | example |
|---|---|
| pprint | from pprint import pprint |
| library | example |
|---|---|
| printoutputdebug_module | from printoutputdebug_module import * |
- usage in a class create in your class a self variable to get the link to the library here "out"
| type | initialisation |
|---|---|
| in a class | class YouCLASS(Client): def init(self,...,out=None): self.server=server self.out=out |
| in the script | out=outputs(level=args.parameters.level ,printout=args.doprint ,debugFileName=args.debug_file ,outputFileName=args.output_file ,logFileName=args.log_file) |
| Example of usage |
|---|
| #here for DEBUG level self.out.DEBUG self.out.echo(self.out.DEBUG,'YOUR MESSAGE') |
| out.writeOutput('w',"") |
| #use humanJsonFormat to show JSON in a human format out.echo(DEBUG,out.humanJsonFormat(configslist)) |