Message160450
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.) |
|
Date |
User |
Action |
Args |
2012-05-11 21:02:01 | terry.reedy | set | recipients:
+ terry.reedy, ned.deily, takluyver, serhiy.storchaka |
2012-05-11 21:02:01 | terry.reedy | set | messageid: <1336770121.77.0.338573422626.issue14777@psf.upfronthosting.co.za> |
2012-05-11 21:02:01 | terry.reedy | link | issue14777 messages |
2012-05-11 21:02:00 | terry.reedy | create | |
|