Questions tagged [pyperclip]

A cross-platform clipboard module for Python.

Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.

More information:

191 questions
0
votes
0 answers

How can I use pyperclip on EC2?

When I try to run my program on EC2, I cannot use the pyperclip library This is my code import pyperclip pyperclip.copy('Hello, World!') text_copied = pyperclip.paste() print(text_copied) And Error pyperclip.PyperclipException: Pyperclip…
0
votes
2 answers

Do pyperclip3 or pasteboard support paste of PNG on macOS

I am trying to figure out how to paste a PNG graphic from the clipboard into a Python script on macOS. I have looked into using the pyperclip, pyperclip3, and pasteboard modules. I cannot get any of these to work. I am able to paste text from the…
MikeMayer67
  • 570
  • 6
  • 17
0
votes
0 answers

Problem with python script that takes image to text

When running this script and trying to paste it, it doesn't work. import pytesseract import pyperclip import PIL.Image # Open the image file image = PIL.Image.open('generate_word_picture.png') # Extract the text from the image using…
Syrex
  • 1
  • 3
0
votes
2 answers

Pyperclip copy and dividing the results

I'm having some issues with my code not dividing the copied answers and instead giving me string errors. for x in range(5): time.sleep(3) coordinates = (pyperclip.paste()) print(coordinates/2) TypeError: unsupported operand type(s) for…
0
votes
0 answers

Problem using the pyperclip library on VSCode

I need my program to copy some text to the clipboard. For that, I thought of using the pyperclip library. But every time I run my code an error appears "Pyperclip could not find a copy/paste mechanism for you system." I´ve experimented doing a…
0
votes
1 answer

pyperclip copies to clipboard but wont paste

I am trying to make a script that automates creating Anki (flashcard app) cards. I need to be able to go through and paste text into fields of the card. I am trying to use pyperclip but it is not working. Even taking the code outside of the file…
0
votes
0 answers

Running Python script in Linux, fail with pyperclip import

Good day everyone. I'm the beginner in learning Python. I made script with import of pyperclip module. When I run this script in Spyder IDE, everything is OK. When I start this script from terminal, it is also OK. But when I'm trying to make…
0
votes
1 answer

Does the MacOS Clipboard have a path to it?

I am currently working on a python program that makes use of the clipboard. If you want to know more, I am finding a way to access clipboard history, which is very hard to find for free. I then realized I had no idea how to access the clipboard. My…
0
votes
0 answers

Python-Slenium-Get value from clipboard when click button

Here is a button on the page which when I clicked copies, a value was set to the clipboard. Ex: button click to save wallet address. It's simple when use single case (with tk or pyperclip.....), but when multi-threading, clipboard so messing. I have…
namSon Vo
  • 1
  • 1
0
votes
0 answers

How do I paste to a string in python using the app Pyto?

My girlfriend reads a lot and mentioned that she comes across books that are in different languages. I want to write a script using the app Pyto to translate, this allows the use of Iphone's shortcuts and will make the process mostly automated for…
Cem
  • 27
  • 1
  • 4
0
votes
1 answer

Python script clipboard times out

So, I'm running a script from the Command Prompt with elevated permissions (Python3). It runs perfectly for a time. But after about 10 minutes, it times out with this error: Traceback (most recent call last): File…
0
votes
1 answer

How to repair an error "Pyperclip could not find a copy/paste mechanism in your device" in Python Kivy?

I am using Pyperclip library in Python in Kivy UI, and I want to be able to copy a text by pressing a button, but it gives me this error message: pyperclip.PyperclipException: Pyperclip could not find a copy/paste mechanism for your system. …
Aturtl3
  • 37
  • 8
0
votes
0 answers

Why does jupyter kernel keep dying?

I am trying to run this code. But when I run this code my jupyter kernel keeps dying and doesn't restart. Code: import tkinter import pyperclip from tkinter import * win = Tk() win.geometry('700x350') my_clip = Text(win, height=15) my_clip.pack def…
Anvita
  • 1
  • 1
0
votes
1 answer

How do I insert an apostrophe to the start and end of a new line?

So, I'm trying to write this code that gets its input from the clipboard and then transforms the input by adding apostrophe and comma to the start and end of each line. This is the code I've written. import pyperclip text=pyperclip.paste() #…
Joseph
  • 1
0
votes
1 answer

pyperclip issues with PyCharm and batch files

I've been working through the book 'Automate the Boring Stuff With Python' and am doing the mclip chapter project, the code is fine, but I'm having issues with the execution. the idea of the program is that it's a callable program from window's Run…