コード例 #1
0
ファイル: __init__.py プロジェクト: tlynn/bitlike
def print(msg):
    if hasattr(msg, 'get_pixel'):
        for y in range(5):
            for x in range(5):
                set_pixel(x, y, msg.get_pixel(x, y))
    else:
        _print(msg)
コード例 #2
0
def spool_print(*args, **kwargs):
    with _print_lock:
        if framework.Framework._spool:
            framework.Framework._spool.write(f"{args[0]}{os.linesep}")
            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
        builtins._print(*args, **kwargs)
コード例 #3
0
def spool_print(*args, **kwargs):
    with _print_lock:
        if framework.Framework._spool:
            framework.Framework._spool.write(f"{args[0]}{os.linesep}")
            framework.Framework._spool.flush()
        # disable terminal output for server jobs
        if framework.Framework._mode == Mode.JOB:
            return
        # new print function must still use the old print function via the backup
        builtins._print(*args, **kwargs)
コード例 #4
0
 def print(message, color=None, end='\n'):
     _print(message, end=end)
コード例 #5
0
 def print(message, color=None, end='\n'):
     _print((colored(message, color)), end=end)
コード例 #6
0
def print(*objects, indent=0, markup='', **print_kwargs):
    _print('\t' * indent, markup, *objects, **print_kwargs)
コード例 #7
0
from builtins import print as _print

_print("Hello Worlds")
コード例 #8
0
def print(*args, first=[True], **kwargs):
    _print(*args, **kwargs)
    if first and first.pop():
        _print(f"follow me on twitter @sushtend".rjust(80, " "))
    else:
        _print(f"@sushtend".rjust(80, " "))
コード例 #9
0
def print(*args, **kwargs):
    from builtins import print as _print
    nargs = [remove_accent(arg) if isinstance(arg, str) else arg for arg in args]
    _print(*nargs, **kwargs)
コード例 #10
0
ファイル: __init__.py プロジェクト: tlynn/bitlike
def scroll(msg):
    # TODO: Font.
    _print(msg)
コード例 #11
0
 def print(self, *args, **kwargs):
     cf = sys._getframe(self.level + 1)
     _print(
         '{}:{} in '.format(compress(cf.f_code.co_filename), cf.f_lineno,
                            cf.f_code.co_name), '|', *args, **kwargs)