File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,20 @@ def km_from_string(s):
68
68
# filefind also allows for absolute paths, in which case the search
69
69
# is ignored
70
70
try :
71
- fullpath = find_connection_file (s .lstrip ().rstrip ())
71
+ # XXX : the following approach will be brittle, depending on what
72
+ # connection strings will end up looking like in the future, and
73
+ # whether or not they are allowed to have spaces. I'll have to sync
74
+ # up with the IPython team to address these issues - pi
75
+ if ' --profile' in s:
76
+ k ,p = s .split (' --profile' )
77
+ k = k .lstrip ().rstrip () # kernel part of the string
78
+ p = p .lstrip ().rstrip () # profile part of the string
79
+ fullpath = find_connection_file (k ,p )
80
+ else :
81
+ fullpath = find_connection_file (s .lstrip ().rstrip ())
72
82
except IOError,e :
73
83
echo (" :IPython " + s + " failed" , " Info" )
74
- echo (" ^-- failed -- " + s + " not found" , " Error" )
84
+ echo (" ^-- failed ' " + s + " ' not found" , " Error" )
75
85
return
76
86
km = BlockingKernelManager (connection_file = fullpath)
77
87
km .load_connection_file ()
You can’t perform that action at this time.
0 commit comments