tools.filterProc
Help Info
Run the output from the given command through a few filters that will strip out unnecessary warnings.
usage: filterProc [-h] [--quiet] [command ...]
Positional Arguments
- command
The command to run
Named Arguments
- --quiet
Suppress info and debug messages, leaving only serious warnings.
Default:
False
Usage
A little script that removes unhelpful warnings from program outputs.
Can be used either in a pipe, as in cat log.out | filterProc
or as a parent process as in filterProc trainSoloModel config.json.
In the second case, this program will capture both stdout and stderr.
- class bpreveal.tools.filterProc.Writer(quiet)
Accepts data from pipes and writes it to stdout once it encounters a newline.
- add(data)
Add a bytes object of output from a pipe.
- printLine()
Once an end of line has been hit, print the current line.
- checkLine(line)
Should the given line be printed? Checks against the regexes.
- bpreveal.tools.filterProc.runProc(command, quiet)
Lets the process run and scrapes its stdout and stderr.
- Parameters:
command – An array of strings giving the command to run.
quiet (bool) – Should this filter also suppress normal informational messages?
- bpreveal.tools.filterProc.getParser()
Build (but don’t parse_args) the parser.
- bpreveal.tools.filterProc.main()
Run the program.