I am trying to use PyClip to copy and paste into and form clipboard.
These work correctly:
import pyclip
pyclip.copy("ab")
print(list(pyclip.paste()))
returns
[97, 98]
import pyclip
pyclip.copy("ab")
print(pyclip.paste(text=True))
returns
ab
But now I want to copy to clipboard "ab" but in the form of bytes:
import pyclip
pyclip.copy(bytes(97))
print(pyclip.paste(text=True))
returns some garbage
So how to copy into clipboard bytes 97 and 98 that when pasted somewhere else I would got "ab"?
Update:
To be more precise. I want to copy a string into clipboard in the form of bytes by Python and then by pressing CTRL+V in windows I want the same string to be pasted somewhere.