CodeTalk
CodeTalk

Reputation: 3657

Python3 module to copy string to system clipboard

I tried doing some research, but havent seem to come up with something yet, so i figured someone might be able to help.

I want to use my existing python code:

decoded_pass = decrypt(
                    param_encoded_salt,
                    param_encoded_password
                ).decode('utf-8')

and copy its value to my system "clipboard".

So if I go into another application and ctrl+v it will have the value of decoded_pass

How can I do this in Python3

Upvotes: 2

Views: 540

Answers (2)

ronrest
ronrest

Reputation: 1222

You could try pyperclip. Website is here: http://coffeeghost.net/2010/10/09/pyperclip-a-cross-platform-clipboard-module-for-python/

Upvotes: 1

furas
furas

Reputation: 142641

There is pyperclip. Probably PyAutoGUI can do it too (the same author).

Upvotes: 2

Related Questions