-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-44431: Added command line functionality to UUID module. #26751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix failing tests and add a news entry given this is an enhancement.
@@ -0,0 +1 @@ | |||
UUID module now supports being called from command line. ex > python -m uuid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need an example in a news entry. I would do way with ex > python -m uuid
.
|
||
if __name__ == '__main__': | ||
""" | ||
Enables uuid to be called from the command line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can move this logic into a helper method so that we just call the method here? Most libraries seem to follow this e.g Lib/timeit.py
This PR is stale because it has been open for 30 days with no activity. |
I often need to generate a GUID quickly and from the command line.
Rather than install additional utilities to accomplish this on various platforms, it would be amazing if Python had this functionality built-in.
I specifically avoided using any additional modules such as argparse to handle the few arguments that uuid3 and uuid5 have to keep the functionality lightweight, instead relying on sys.argv to capture the additional arguments from the CLI.
Looking forward to hearing others' thoughts on this functionality.
https://bugs.python.org/issue44431