Skip to content

Instantly share code, notes, and snippets.

@draperjames
Created June 15, 2017 14:55
Show Gist options
  • Save draperjames/3f115cad08929ee55fa7159bf0cb29a7 to your computer and use it in GitHub Desktop.
Save draperjames/3f115cad08929ee55fa7159bf0cb29a7 to your computer and use it in GitHub Desktop.
ipywidgets timestamp for your Jupyter Notebook
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