From 62cd1f3a10c5e19b8b7215ffb6b423cf6102468e 2013-03-04 23:03:33 From: MinRK Date: 2013-03-04 23:03:33 Subject: [PATCH] Backport PR #2638: Fix %paste in Python 3 on Mac Fixes #2637. --- diff --git a/IPython/lib/clipboard.py b/IPython/lib/clipboard.py index deef0da..194dae9 100644 --- a/IPython/lib/clipboard.py +++ b/IPython/lib/clipboard.py @@ -30,7 +30,7 @@ def osx_clipboard_get(): stdout=subprocess.PIPE) text, stderr = p.communicate() # Text comes in with old Mac \r line endings. Change them to \n. - text = text.replace('\r', '\n') + text = text.replace(b'\r', b'\n') return text def tkinter_clipboard_get():