189-Paste until exit
steve-shambles-2109 Oct 23rd, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Python code snippets vol 38:
- 189-Paste until exit
- requirements: pip3 install pyperclip
- import pyperclip as clipbd
- # Capture the information from your clipboard and paste them into a
- # file until the text "EXIT!" Is copied.
- lastdata = ""
- f = open("Product.txt", "a+")
- while clipbd.paste() != 'EXIT!':
- if lastdata == clipbd.paste():
- lastdata = clipbd.paste()
- i = 0
- for line in lastdata.split(sep="\r\n"):
- i = i + 1
- if i >= 8 and i < 22:
RAW Paste Data