Add python2 compat as suggested by @hellpanderrr in Issue #1.

This commit is contained in:
Axel Naumann 2016-04-09 10:44:44 +02:00 committed by sftnight
parent ac3d7022f0
commit 434d039331

View File

@ -67,7 +67,11 @@ class ClingKernel(Kernel):
def __init__(self, **kwargs):
super(ClingKernel, self).__init__(**kwargs)
whichCling = shutil.which('cling')
try:
whichCling = shutil.which('cling')
except AttributeError:
from distutils.spawn import find_executable
whichCling = find_executable('cling')
if whichCling:
clingInstDir = os.path.dirname(os.path.dirname(whichCling))
llvmResourceDir = clingInstDir