Ejemplo n.º 1
0
def puts(s='', newline=True, stream=STDOUT):
    """
    Wrap puts to avoid getting called twice by Werkzeug reloader.
    """
    if not is_werkzeug_process():
        try:
            return _puts(s, newline, stream)
        except UnicodeEncodeError:
            return _puts(s.encode(sys.stdout.encoding), newline, stream)
Ejemplo n.º 2
0
def puts(s='', newline=True, stream=STDOUT):
    """
    Wrap puts to avoid getting called twice by Werkzeug reloader.
    """
    if not is_werkzeug_process():
        try:
            return _puts(s, newline, stream)
        except UnicodeEncodeError:
            return _puts(s.encode(sys.stdout.encoding), newline, stream)
Ejemplo n.º 3
0
def puts(string='', newline=True, stream=STDOUT):
    _puts(safe_str(string), newline, stream)