| Server IP : 185.208.173.17 / Your IP : 87.236.161.98 Web Server : Microsoft-IIS/10.0 System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64 User : IUSR ( 0) PHP Version : 7.4.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Program Files/Cloudbase Solutions/Cloudbase-Init/Python/Lib/site-packages/pyperclip/ |
Upload File : |
import pyperclip
import sys
if len(sys.argv) > 1 and sys.argv[1] in ('-c', '--copy'):
if len(sys.argv) > 2:
pyperclip.copy(sys.argv[2])
else:
pyperclip.copy(sys.stdin.read())
elif len(sys.argv) > 1 and sys.argv[1] in ('-p', '--paste'):
sys.stdout.write(pyperclip.paste())
else:
print('Usage: python -m pyperclip [-c | --copy] [text_to_copy] | [-p | --paste]')
print()
print('If a text_to_copy argument is provided, it is copied to the')
print('clipboard. Otherwise, the stdin stream is copied to the')
print('clipboard. (If reading this in from the keyboard, press')
print('CTRL-Z on Windows or CTRL-D on Linux/macOS to stop.')
print('When pasting, the clipboard will be written to stdout.')