[Python-ideas] Provide __main__ for datetime and time
alexander.belopolsky at gmail.com
Fri Apr 1 20:49:25 EDT 2016
On Fri, Apr 1, 2016 at 2:02 PM, Michel Desmoulin <desmoulinmichel at gmail.com>
> 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__.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas