Skip to content

Instantly share code, notes, and snippets.

@lf-
Created June 28, 2017 20:10
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lf-/5a66de25dbc7f3439e10af2d1ebfcde4 to your computer and use it in GitHub Desktop.
I blame @parrottq for this
import contextlib
@contextlib.contextmanager
def lennyface():
global print
oldprint = print
def new_print(*args, **kwargs):
#newargs = [a.replace(' ', '( ͡° ͜ʖ ͡°)') for a in args]
args = list(args)
args.append('( ͡° ͜ʖ ͡°)')
oldprint(*args, **kwargs)
try:
__builtins__['print'] = new_print
yield
finally:
__builtins__['print'] = oldprint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment