def display_notification(self, options=None, notification_uuid=None):
if options is None:
options = self.options
if notification_uuid is None:
notification_uuid = uuid.uuid4()
# display our browser notification using javascript
with open(resource_filename("jupyternotify", "js/notify.js")) as jsFile:
jsString = jsFile.read()
display(Javascript(jsString % {
"notification_uuid": notification_uuid,
"options": json.dumps(options),
}))
评论列表
文章目录