mwcraig / reducer

Friendly professional-level data reduction...documentation here:
https://reducer.readthedocs.org
BSD 3-Clause "New" or "Revised" License
26 stars 10 forks source link

Add logic to handle imports from IPython 3 or IPython 4 #97

Closed mwcraig closed 9 years ago

mwcraig commented 9 years ago

something like:

from IPython import version_info

if version_info[0] == 3:
    from IPython.widgets import widgets
elif version_info[0]  > 3:
    import ipywidgets as widgets
else:
   raise ImportError('This version of reducer only works with IPython 3 or higher')