- Every function that prints anything is required by convention to possess a "quiet" parameter, defaulted to false.
- Every function that prints anything is required by convention to use the printf module to print.
- When calling the printf module, the "quiet" parameter is passed along to printf.
- Printf determines, though a combination of the "quiet" parameter and the warnlevel, whether or not to print anything.
Example of use:
Code: Select all
def foo(a, b, quiet = False):
printf( a + " just foobared " + b, ALL, quiet = quiet)
foo("Rye", "Matt", quiet = True)
# prints nothing
foo("Rye", "Matt")
# prints "Rye just foobared Matt"
-Rye