X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=iramuteq.py;h=af6c52126ea4f870731db91f02da7e1a296abb62;hp=c59894bfa37396a22d98ccda58d5a98130ef7fe4;hb=07808c0994b4f7d3ffadcb8c862e478af0141238;hpb=0ddddd038d216355e285058b9308f1975de0105a 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) #####################################################################