Skip to content

Instantly share code, notes, and snippets.

@volkstrader
Last active March 24, 2020 17:47
Show Gist options
  • Select an option

  • Save volkstrader/d7e19bc9dfac9b9d403108832fce75ba to your computer and use it in GitHub Desktop.

Select an option

Save volkstrader/d7e19bc9dfac9b9d403108832fce75ba to your computer and use it in GitHub Desktop.
python copy to clipboard
import subprocess
process = subprocess.Popen('pbcopy', env={'LANG': 'en_US.UTF-8'}, stdin=subprocess.PIPE)
process.communicate(output.encode('utf-8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment