Show More
@@ -5,7 +5,7 b' import subprocess' | |||
|
5 | 5 | import sys |
|
6 | 6 | |
|
7 | 7 | from IPython.core.error import TryNext |
|
8 | ||
|
8 | import IPython.lib.py3compat as py3compat | |
|
9 | 9 | |
|
10 | 10 | def win32_clipboard_get(): |
|
11 | 11 | """ Get the current clipboard's text on Windows. |
@@ -31,6 +31,7 b' def osx_clipboard_get():' | |||
|
31 | 31 | text, stderr = p.communicate() |
|
32 | 32 | # Text comes in with old Mac \r line endings. Change them to \n. |
|
33 | 33 | text = text.replace('\r', '\n') |
|
34 | text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING) | |
|
34 | 35 | return text |
|
35 | 36 | |
|
36 | 37 | def tkinter_clipboard_get(): |
@@ -49,6 +50,7 b' def tkinter_clipboard_get():' | |||
|
49 | 50 | root.withdraw() |
|
50 | 51 | text = root.clipboard_get() |
|
51 | 52 | root.destroy() |
|
53 | text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING) | |
|
52 | 54 | return text |
|
53 | 55 | |
|
54 | 56 |
General Comments 0
You need to be logged in to leave comments.
Login now