I am currently using ipython. When I try to use the well-known magic function %paste, I get an error message:
tkinter_clipboard_get() takes no arguments (1 given)
The entire stack looks like this:
In [131]: %paste
————————————————————————— TypeError Traceback (most recent call
last)
—-> 1 get_ipython().magic(u’paste’)C:\Python27\lib\site-packages\IPython\core\interactiveshell.pyc in
magic(self, a rg_s, next_input) 1983
self._magic_locals = sys._getframe(1).f_locals 1984
with self.builtin_trap:
-> 1985 result = fn(magic_args) 1986 # Ensure we’re not keeping object references around:1987 self._magic_locals = {}
C:\Python27\lib\site-packages\IPython\frontend\terminal\interactiveshell.pyc
in magic_paste(self, parameter_s)
633 return
634 try:
–> 635 text = self.shell.hooks.clipboard_get()
636 block = strip_email_quotes(text.splitlines())
637 except TryNext as clipboard_exc:C:\Python27\lib\site-packages\IPython\core\hooks.pyc in call(self,
args, * kw)
133 #print “prio”,prio,”cmd”,cmd #dbg134 try:–> 135 return cmd(*args, **kw)
136 except TryNext, exc:
137 if exc.args or exc.kwargs:C:\Python27\lib\site-packages\IPython\core\hooks.pyc in
clipboard_get(self)
225 for func in chain:
226 dispatcher.add(func)
–> 227 text = dispatcher()
228 return textC:\Python27\lib\site-packages\IPython\core\hooks.pyc in call(self,
args, * kw)
133 #print “prio”,prio,”cmd”,cmd #dbg134 try:–> 135 return cmd(*args, **kw)
136 except TryNext, exc:
137 if exc.args or exc.kwargs:
Any ideas?
This is a bug that was recently fixed in the development version.
As a workaround, you can install pywin32, which should give it a different way to access the clipboard.