From 07808c0994b4f7d3ffadcb8c862e478af0141238 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 13 Jan 2013 21:50:39 +0100 Subject: [PATCH] ... --- iramuteq.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/iramuteq.py b/iramuteq.py index c59894b..af6c521 100644 --- a/iramuteq.py +++ b/iramuteq.py @@ -128,16 +128,25 @@ ch = logging.StreamHandler() formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) fh.setFormatter(formatter) -log.addHandler(ch) log.addHandler(fh) +if sys.platform != 'win32' or sys.platform != 'darwin': + log.addHandler(ch) log.setLevel(logging.INFO) class writer(object): def write(self, data): if data.strip() != '' : - log.info('BUG : %s' % data) + log.info('ERROR : %s' % data) + +class printer(object) : + def write(self, data) : + if data.strip() != '' : + log.info('Print : %s' % data) + sys.stderr = writer() +sys.stdout = printer() + ConfigPath = ConstructConfigPath(UserConfigPath) ##################################################################### -- 2.7.4