[Python-ideas] Provide __main__ for datetime and time
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.
>> python -m datetime now => print(str(datetime.datetime.now())
>> python -m datetime utcnow => print(str(datetime.datetime.utcnow())
> In fact, I would not mind seeing a fairly complete GNU date utility 
> reimplementation as datetime.__main__.
Seems like Microsoft is solving this problem for you.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas