This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients ned.deily, serhiy.storchaka, takluyver, terry.reedy
Date 2012-05-11.21:02:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1336770121.77.0.338573422626.issue14777@psf.upfronthosting.co.za>
In-reply-to
Content
There are definitely platform differences. As I noted, the original example works fine on Windows. However

>>> root.clipboard_get(type='STRING')
'abc€'
>>> root.clipboard_get(type='UTF8_STRING')
Traceback (most recent call last):
  File "<pyshell#21>", line 1, in <module>
    root.clipboard_get(type='UTF8_STRING')
  File "C:\Programs\Python33\lib\tkinter\__init__.py", line 549, in clipboard_get
    return self.tk.call(('clipboard', 'get') + self._options(kw))
_tkinter.TclError: CLIPBOARD selection doesn't exist or form "UTF8_STRING" not defined

Of course, on Windows I suspect that the unicode string is not copied to clipboard as utf8 bytes, so if clipboard contents are tagged, there would not be such a thing. Perhaps clipboards work differently on diffferent OSes.

>>> help(root.clipboard_get)
...
    The type keyword specifies the form in which the data is
    to be returned and should be an atom name such as STRING
    or FILE_NAME.  Type defaults to STRING.

(Actually, FILE_NAME give the same exception as UTF8_STRING.)
History
Date User Action Args
2012-05-11 21:02:01terry.reedysetrecipients: + terry.reedy, ned.deily, takluyver, serhiy.storchaka
2012-05-11 21:02:01terry.reedysetmessageid: <1336770121.77.0.338573422626.issue14777@psf.upfronthosting.co.za>
2012-05-11 21:02:01terry.reedylinkissue14777 messages
2012-05-11 21:02:00terry.reedycreate