Copy text to the clipboard if pyperclip is installed.
(text)
| 83 | |
| 84 | |
| 85 | def copyIfPossible(text): |
| 86 | """Copy text to the clipboard if pyperclip is installed.""" |
| 87 | try: |
| 88 | print('Copied to clipboard.') |
| 89 | pyperclip.copy(text) # Copy the text to the clipboard. |
| 90 | except: |
| 91 | pass # If pyperclip wasn't imported, do nothing. |
| 92 | |
| 93 | |
| 94 | def encryptMessage(message, key): |
no outgoing calls
no test coverage detected