[Python-ideas] Provide __main__ for datetime and time

Michael Selik mike at selik.org
Mon Apr 4 02:37:51 EDT 2016


On Sat, Apr 2, 2016 at 1:49 AM Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

>
> On Fri, Apr 1, 2016 at 2:02 PM, Michel Desmoulin <
> desmoulinmichel at gmail.com> wrote:
>
>> As with my previous email about __main__ for random, uuid and os, I wish
>> to suggest a similar __main__ for datetime. The target audience may not
>> be the same, so I'm making it a difference proposal.
>>
>> E.G:
>>
>> python -m datetime now => print(str(datetime.datetime.now())
>> python -m datetime utcnow => print(str(datetime.datetime.utcnow())
>>
>
> +1
>
> In fact, I would not mind seeing a fairly complete GNU date utility [1]
> reimplementation as datetime.__main__.
>
> [1]
> http://www.gnu.org/software/coreutils/manual/html_node/date-invocation.html#date-invocation
>

Seems like Microsoft is solving this problem for you.
http://www.hanselman.com/blog/DevelopersCanRunBashShellAndUsermodeUbuntuLinuxBinariesOnWindows10.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160404/42c660ba/attachment.html>


More information about the Python-ideas mailing list