Add utility function to IPyLammps for embedding videos

This commit is contained in:
Richard Berger
2016-08-10 14:35:48 -04:00
parent 054b1cedb0
commit 57d7a4a6ad

View File

@ -698,3 +698,7 @@ class IPyLammps(PyLammps):
self.write_dump(*cmd_args)
from IPython.core.display import Image
return Image('snapshot.png')
def video(self, filename):
from IPython.display import HTML
return HTML("<video controls><source src=\"" + filename + "\"></video>")