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
1
vote
2 answers

How do I make python copy and paste into a certain application using a keystroke?

I am trying to make a piece of code that makes something like this words = "hello my name is Leo" Into this This is printed on apple notes but what I want it to do is to copy a the word of the text and paste it, then press the enter key and type…
Leo Gaunt
  • 711
  • 1
  • 8
  • 29
1
vote
3 answers

ModuleNotFound error but module has just been installed

I'm using Windows 10, Python 3.6.4. I'm trying to use the module Pyperclip and have installed it with pip: c:\Users\Bertie>pip install pyperclip Requirement already satisfired: pyperclip in c:\python36\lib\site-packages (1.8.0) But when I try to…
1
vote
1 answer

How to copy to clipboard that each element in list will contain a new line [pyperclip]

My current input is input_list = ["5155649076708", "6715439078108", "7123390204635", "6154390460085"] I would like to copy element to clipboard by using pyperclip which, when copied, will be a following (so when pasting, its…
Wing Shum
  • 472
  • 6
  • 19
1
vote
3 answers

Unable to import pyperclip in my python IDLE, but able to import from command prompt

This is my first question on stackoverflow and I'm new to Python. I want to import pyperclip module. So I went to cmd, ran as administrator, moved to the path using - cd \Program Files\Python37\Scripts and downloaded pip via pip3 install pyperclip…
1
vote
0 answers

I am facing error in installing pyperclip

C:\Python37-32\Scripts>pip.exe install pyperclip Fatal error in launcher: Unable to create process using '"c:\python37-32\python.exe" "C:\Python37-32\Scripts\pip.exe" install pyperclip'
Kul
  • 11
  • 1
1
vote
0 answers

is it impossible to use clipboard on aws(amazon-web-service) ubuntu18.04 instance?

I've trying to use python library which is called pyperclip on AWS EC2 Ubuntu18.04 with jupyter-notebook. when I import pyperclip and test if its copy() function works properly, import pyperclip pyperclip.copy(2) I continually get this…
1
vote
1 answer

Is there a way to format the clipboard with italics through python?

I'm looking to automate the formatting of sources in a Microsoft word document(.docx). The problem is that some of the text in the new format has to be in italics. Is there a way in python to format text in italics to the clipboard? If you…
Mr. C
  • 13
  • 2
1
vote
2 answers

How to use Python's Pyperclip to paste text on a separate program?

I am trying to code a very basic code where I copy some text from one program and then paste it in a different program. I'm not sure how to do this as Pyperclip only seems to paste the text on the command window where I run the code. I want to be…
ATP
  • 603
  • 1
  • 9
  • 14
1
vote
0 answers

Change clipboard when text is pasted in Python?

I have a text file with a long list of names that I have to copy and paste into various fields in a separate program. I have converted all the names to a list, then have pyperclip copy the names to the clipboard. My solution to get to the next name…
Runnamuck
  • 11
  • 1
1
vote
1 answer

Does pyperclip have a maximum of characters?

I have a problem using pyperclip. I have to upload a bunch of documents to the web. I used the join method to make a string of the files contained in a specific folder. The problem comes when that string reaches 260 characters. pyperclip copies up…
Noelia
  • 41
  • 4
1
vote
1 answer

Unable to import pyperclip module

I used pip3 install pyperclip and it successfully installed pyperclip: user@user:~$ pip3 install pyperclip Collecting pyperclip Installing collected packages: pyperclip Successfully installed pyperclip-1.6.2 When I tried to import pyperclip in…
vApor
  • 23
  • 1
  • 5
1
vote
3 answers

How to paste text from clipboard on mac while running selenium - Python

I have a function that verifies the data copied to clipboard def verify_copied_transcript_data(self): selector = '//input[@type="text" and @name="topic"]' topic_field = self.wait_for_element_by_xpath(selector) topic_field.clear() …
UZ_IT
  • 51
  • 1
  • 6
1
vote
1 answer

How should I resolve "Wrong Type" error while using pyperclip?

Was trying some simple code practice with pyperclip from "Automate boring stuff with Python" book, but I keep running in to the below error when trying to run the program with the command line. Have tried looking all over the web to no avail: I have…
1
vote
0 answers

Ubuntu 16.04 - Python 3 - Pyperclip in terminal and via systemd

Currently i am working on a little application which deals with the pyperclip module. First of all, my setup: ubuntu 16.04 | python3 | pyperclip 1.6.0 (newest! 2017-11-08) Situation 1: When i run my python script directly: python3 app.py it all…
Creative crypter
  • 1,348
  • 6
  • 30
  • 67
1
vote
0 answers

How to copy a text file onto pyperclip which has blank lines?

I am using python 3.6.2 on Windows 10. I made this program to read text from a .txt file and then copy that to the clipboard. Code: import pyperclip text=(open("trackers.txt")).read() print(text) pyperclip.copy(text) spam =…
Vikhyat Agarwal
  • 1,723
  • 1
  • 11
  • 29