Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@PeteGabriel
Created April 13, 2018 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PeteGabriel/2998a353743d67d017fa78809bca8020 to your computer and use it in GitHub Desktop.
Save PeteGabriel/2998a353743d67d017fa78809bca8020 to your computer and use it in GitHub Desktop.
Generate a guid and copy it to clipboard (no console open)
# Install the following modules:
# pip install pyperclip
# pip install uuid
import uuid
import pyperclip
pyperclip.copy(str(uuid.uuid1()))
# On Windows systems, there is no notion of an “executable mode”.
# The Python installer automatically associates .py files with python.exe
# so that a double-click on a Python file will run it as a script.
# The extension can also be .pyw, in that case, the console window that normally appears is suppressed.
@PeteGabriel
Copy link
Author

PeteGabriel commented Apr 13, 2018

Generate a guid and copy it to clipboard (no console open). Tested with Python 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment