From 1b29ddb2a1c9d1a9e9010f21029369bf32a0638b Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Sat, 24 Jan 2015 17:19:57 +0100 Subject: [PATCH] adding simple function to silence most of the output --- doc/autobuild.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/autobuild.py b/doc/autobuild.py index 54b9ef72e..4f028a4f0 100644 --- a/doc/autobuild.py +++ b/doc/autobuild.py @@ -60,6 +60,13 @@ import kivy.interactive import kivy.garden from kivy.factory import Factory +# check for silenced build +BE_QUIET = False +for arg in sys.argv: + if "silenced=" in arg: + arg.split("=")[1] == "yes": + BE_QUIET = True + # force loading of all classes from factory for x in list(Factory.classes.keys())[:]: getattr(Factory, x) @@ -75,7 +82,7 @@ def writefile(filename, data): global dest_dir # avoid to rewrite the file if the content didn't change f = os.path.join(dest_dir, filename) - print('write', filename) + if not BE_QUIET: print('write', filename) if os.path.exists(f): with open(f) as fd: if fd.read() == data: