2

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

4
  • 1
  • @user2357112 - actually text = clipboard.paste() just copies the value to text, not to memory.
    – CodeTalk
    Commented Jan 22, 2016 at 21:53
  • 1
    @CodeTalk what "memory" do you mean ? text = clipboard.paste() copies from clipboard to text variable and clipboard.copy(text) copies from text variables to clipboard.
    – furas
    Commented Jan 22, 2016 at 22:00
  • @furas - thanks for that explanation! That's really helpful!
    – CodeTalk
    Commented Jan 22, 2016 at 22:13

2 Answers 2

2

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

1

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.