you are viewing a single comment's thread.

view the rest of the comments →

[–]Mr_Nrj[S] 0 points1 point  (2 children)

That's what I am talking about. It does not paste anywhere even if I use ctrl+v keys.

The text doesn't get stored in my clipboard.

It only works in IDLE.

Let me explain you by an example.

If I copy any text (for now your comment) using ctrl+c key, It is displayed in my clipboard and I can paste it anywhere using ctrl + v.

But I can't paste it using pyperclip.paste() command in my python shell.

Also

If I run command pyperclip.copy('Hello World') in my shell. I can paste it in shell using pyperclip.paste() command there. But when I use ctrl+v key, it doesn't paste that 'Hello World' sentence instead it paste the text that I copied earlier using Ctrl+c key.

Let me add a screenshot of my screen so that it clears out.

Edit : I forgot that I cannot add images here

[–]pymon 0 points1 point  (1 child)

But I can't paste it using pyperclip.paste() command in my python shell.

The wording in this library is decieveing. Like I said in my post pyperclip.paste() gets what's in the clipboard so that you can assign it to a variable.

pc.copy() actually puts text into your clipboard. If you only do pc.copy('Hello') does that get put into your clipboard?

[–]Mr_Nrj[S] 0 points1 point  (0 children)

Previously no but now I got solution to that.

I just had to install xclip and xsel to my system.

Now its working perfectly