code: def communicator(func):
      '''Warning, this is a picklable decorator !'''
      def _call(queue, args, kwargs):
          '''called with [queue, args, kwargs] as first optional arg'''
          kwargs['queue'] = queue
          ret = None
          try:
              ret = func(*args, **kwargs)
              queue.put('END')
          except KeyboardInterrupt as ex:
              trace = traceback.format_exc()
              queue.put('KEYBOARDINT')
              queue.put('Keyboard interrupt')
              queue.put('{0}\n{1}\n'.format(ex, trace))
          except Exception as ex:
              trace = traceback.format_exc()
              queue.put('ERROR')
              queue.put('Exception')
              queue.put('{0}\n{1}\n'.format(ex, trace))
          except SystemExit as ex:
              trace = traceback.format_exc()
              queue.put('ERROR')
              queue.put('System exit')
              queue.put('{0}\n{1}\n'.format(ex, trace))
          return ret
      return _calf communicator(func):
      '''Warning, this is a picklable decorator !'''
      def _call(queue, args, kwargs):
          '''called with [queue, args, kwargs] as first optional arg'''
          kwargs['queue'] = queue
          ret = None
          try:
              ret = func(*args, **kwargs)
              queue.put('END')
          except KeyboardInterrupt as ex:
              trace = traceback.format_exc()
              queue.put('KEYBOARDINT')
              queue.put('Keyboard interrupt')
              queue.put('{0}\n{1}\n'.format(ex, trace))
          except Exception as ex:
              trace = traceback.format_exc()
              queue.put('ERROR')
              queue.put('Exception')
              queue.put('{0}\n{1}\n'.format(ex, trace))
          except SystemExit as ex:
              trace = traceback.format_exc()
              queue.put('ERROR')
              queue.put('System exit')
              queue.put('{0}\n{1}\n'.format(ex, trace))
          return ret
      return _call
docs: Warning, this is a picklable decorator !