fsleyes.filtermain¶
This module provides an alternate FSLeyes entry point to (func:fsleyes.main.main).
The main() function in this module calls fsleyes.main.main(), but
additionally intercepts and filters the standard out/error streams, and drops
useless warnings/errors which originate from underlying libraries.
-
fsleyes.filtermain.filter_stream(stream, die, filters=None)[source]¶ Intercept the given output stream, and filter it according to the filters above. The filter is run on a separate thread.
- Parameters
stream – File-like to read from and filter.
die –
threading.Eventobject - when it is set the filter thread will end gracefully.filters – List of regular expressions to filter. If
None, defaults toFILTERS.
-
fsleyes.filtermain.main(args=None)[source]¶ Alternate FSLeyes entry point.
Uses the
filter_stream()function to filter the standard output/error streams, then callsfsleyes.main.main().