Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ugly warning messages with IPython 4.0 - The Big Split #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ftplugin/python/vim_ipython.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def new_ipy(s=''):
new_ipy()

"""
from IPython.kernel import KernelManager
from jupyter_client.manager import KernelManager
km = KernelManager()
km.start_kernel()
return km_from_string(km.connection_file)
Expand All @@ -109,10 +109,8 @@ def km_from_string(s=''):
raise ImportError("Could not find IPython. " + _install_instructions)
from IPython.config.loader import KeyValueConfigLoader
try:
from IPython.kernel import (
KernelManager,
find_connection_file,
)
from jupyter_client.manager import KernelManager
from jupyter_client.connect import find_connection_file
except ImportError:
# IPython < 1.0
from IPython.zmq.blockingkernelmanager import BlockingKernelManager as KernelManager
Expand Down Expand Up @@ -141,8 +139,10 @@ def km_from_string(s=''):
k = k.lstrip().rstrip() # kernel part of the string
p = p.lstrip().rstrip() # profile part of the string
fullpath = find_connection_file(k,p)
else:
elif len(s.lstrip().rstrip()):
fullpath = find_connection_file(s.lstrip().rstrip())
else:
fullpath = find_connection_file()
except IOError as e:
echo(":IPython " + s + " failed", "Info")
echo("^-- failed '" + s + "' not found", "Error")
Expand Down