Skip to content

Instantly share code, notes, and snippets.

@wrboyce
Created January 24, 2014 10:11
Show Gist options
  • Select an option

  • Save wrboyce/8594900 to your computer and use it in GitHub Desktop.

Select an option

Save wrboyce/8594900 to your computer and use it in GitHub Desktop.
import subprocess
def pbcopy(data):
p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE)
p.stdin.write(data)
p.stdin.close()
return p.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment