Copy. Paste. Python.

Control-c and Control-v were the first keyboard shortcuts I ever learned, (quickly followed by Control-Alt-Delete). I probably copy/paste upwards of 100 a day, but I often feel like I’m secretly hiding things from my computer when I use copy/paste.

Imagine handing your friend a diplomatic pouch full of missile codes, forbidding him from looking inside, and then asking for it back. That’s what the clipboard is like!

Anywhoozles, I found a cool Python package that lets you programmatically access your clipboard. It’s called Pyperclip, was written by Al Sweigart, and works on OSX, Windows, and Linux. It’s only got two methods: .copy() and .paste(), but that’s all you’ll need.

Pyperclip demo gif

2017 Neal Shyam