Created
June 15, 2017 14:55
-
-
Save draperjames/3f115cad08929ee55fa7159bf0cb29a7 to your computer and use it in GitHub Desktop.
ipywidgets timestamp for your Jupyter Notebook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from ipywidgets import widgets | |
from dominate import tags | |
def timestamp(): | |
"""Return a ipywidget timestamp.""" | |
ts = tags.h4("{:%I:%M:%S %p %A %B %d %Y}".format(datetime.now())) | |
ts_widget = widgets.HTML(ts.render()) | |
return ts_widget |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment