Skip to content

Commit

Permalink
Add python2 compat as suggested by @hellpanderrr in Issue #1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel-Naumann committed Apr 9, 2016
1 parent 8203faa commit 8dc3afe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion interpreter/cling/tools/Jupyter/kernel/clingkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def _banner_default(self):

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
Expand Down

0 comments on commit 8dc3afe

Please sign in to comment.