[Python-ideas] Add __main__ for uuid, random and urandom
mike at selik.org
Fri Apr 1 14:46:11 EDT 2016
There's a large category of these features that is solved by ``python -c``.
What's special about these particular tasks?
On Fri, Apr 1, 2016 at 1:41 PM Michel Desmoulin <desmoulinmichel at gmail.com>
> It's dangerous to talk about a new feature the 1st of April, so I'll
> start by saying this one is not a joke.
> I read recently a proposal to allow md5 hashing doing python -m hashlib
> md5 filename.
> I think it's a great idea, and that can extend this kind of API to other
> parts of Python such as:
> python -m random randint 0 10 => print(random.randin(0, 10))
> python -m random urandom 10 => print(os.urandom(10))
> python -m uuid uuid4 => print(uuid.uuid4().hex)
> python -m uuid uuid3 => print(uuid.uuid3().hex)
> Python-ideas mailing list
> Python-ideas at python.org
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas