Ejemplo n.º 1
0
def spool_print(*args, **kwargs):
    if framework.Framework.spool:
        framework.Framework.spool.write('%s\n' % (args[0]))
        framework.Framework.spool.flush()
    if 'console' in kwargs and kwargs['console'] is False:
        return
    # new print function must still use the old print function via the backup
    __builtin__._print(*args, **kwargs)
Ejemplo n.º 2
0
def spool_print(*args, **kwargs):
    if framework.Framework.spool:
        framework.Framework.spool.write('%s\n' % (args[0]))
        framework.Framework.spool.flush()
    if 'console' in kwargs and kwargs['console'] is False:
        return
    # new print function must still use the old print function via the backup
    __builtin__._print(*args, **kwargs)
Ejemplo n.º 3
0
def spool_print(*args, **kwargs):
    with _print_lock:
        if (framework.Framework._spool):
            framework.Framework._spool.write("%s\n" % (args[0]))
            framework.Framework._spool.flush()
        if ("console" in kwargs and kwargs["console"] is False):
            return
        # new print function must still use the old print function via the
        # backup
        __builtin__._print(*args, **kwargs)