Skip to content

Commit

Permalink
fixed print path to kernel for Python 2.7 on Windows (just in case ev…
Browse files Browse the repository at this point in the history
…en though the support for Python 2.x is dropped)
  • Loading branch information
gfursin committed Jul 8, 2021
1 parent 9d30164 commit 9b1c838
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ck/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6707,7 +6707,14 @@ def short_help(i):
"""

import sys
import pathlib


path_to_kernel=''
try:
import pathlib
path_to_kernel=str(pathlib.Path(__file__))
except Exception as e:
pass

o = i.get('out', '')

Expand All @@ -6728,7 +6735,9 @@ def short_help(i):
h += '\nPython version used by CK: ' + \
r['version'].replace('\n', '\n ')+'\n'

h += '\nPath to the CK kernel: '+str(pathlib.Path(__file__))+'\n'
h += '\n'
if path_to_kernel!='':
h += 'Path to the CK kernel: '+path_to_kernel+'\n'
h += 'Path to the default repo: '+work['dir_default_repo']+'\n'
h += 'Path to the local repo: '+work['dir_local_repo']+'\n'
h += 'Path to CK repositories: '+work['dir_repos']+'\n'
Expand Down

0 comments on commit 9b1c838

Please sign in to comment.