diff --git a/IPython/lib/editorhooks.py b/IPython/lib/editorhooks.py index 7ce0577a091..d8bd6ac81bc 100644 --- a/IPython/lib/editorhooks.py +++ b/IPython/lib/editorhooks.py @@ -6,7 +6,6 @@ """ import os -import pipes import shlex import subprocess import sys @@ -47,9 +46,9 @@ def install_editor(template, wait=False): def call_editor(self, filename, line=0): if line is None: line = 0 - cmd = template.format(filename=pipes.quote(filename), line=line) + cmd = template.format(filename=shlex.quote(filename), line=line) print(">", cmd) - # pipes.quote doesn't work right on Windows, but it does after splitting + # shlex.quote doesn't work right on Windows, but it does after splitting if sys.platform.startswith('win'): cmd = shlex.split(cmd) proc = subprocess.Popen(cmd, shell=True)