diff --git a/liquid_tags/notebook.py b/liquid_tags/notebook.py index 0728999..8b45d5d 100644 --- a/liquid_tags/notebook.py +++ b/liquid_tags/notebook.py @@ -48,8 +48,9 @@ import re import os from .mdx_liquid_tags import LiquidTags +from distutils.version import LooseVersion import IPython -if IPython.__version__.split('.')[0] != '1': +if not LooseVersion(IPython.__version__) >= '1.0': raise ValueError("IPython version 1.0+ required for notebook tag") from IPython import nbconvert @@ -166,16 +167,16 @@ class SubCell(Transformer): nbc = deepcopy(nb) for worksheet in nbc.worksheets : cells = worksheet.cells[:] - worksheet.cells = cells[self.start:self.end] + worksheet.cells = cells[self.start:self.end] return nbc, resources #---------------------------------------------------------------------- # Customize the html template: # This changes the
 tags in basic_html.tpl to