Created
June 28, 2017 20:10
-
-
Save lf-/5a66de25dbc7f3439e10af2d1ebfcde4 to your computer and use it in GitHub Desktop.
I blame @parrottq for this
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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