Add utility function to IPyLammps for embedding videos

This commit is contained in:
Richard Berger
2016-08-10 14:35:48 -04:00
parent a08cf7a4b6
commit 6cbdad7a97

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>")