##// END OF EJS Templates
Merge pull request #12932 from minrk/pipes-quote...
Matthias Bussonnier -
r26506:bbd5c45a merge
parent child Browse files
Show More
@@ -213,7 +213,7 b' class ScriptMagics(Magics):'
213 *cmd,
213 *cmd,
214 stdout=asyncio.subprocess.PIPE,
214 stdout=asyncio.subprocess.PIPE,
215 stderr=asyncio.subprocess.PIPE,
215 stderr=asyncio.subprocess.PIPE,
216 stdin=asyncio.subprocess.PIPE
216 stdin=asyncio.subprocess.PIPE,
217 )
217 )
218 )
218 )
219 except OSError as e:
219 except OSError as e:
@@ -6,7 +6,6 b' Contributions are *very* welcome.'
6 """
6 """
7
7
8 import os
8 import os
9 import pipes
10 import shlex
9 import shlex
11 import subprocess
10 import subprocess
12 import sys
11 import sys
@@ -47,9 +46,9 b' def install_editor(template, wait=False):'
47 def call_editor(self, filename, line=0):
46 def call_editor(self, filename, line=0):
48 if line is None:
47 if line is None:
49 line = 0
48 line = 0
50 cmd = template.format(filename=pipes.quote(filename), line=line)
49 cmd = template.format(filename=shlex.quote(filename), line=line)
51 print(">", cmd)
50 print(">", cmd)
52 # pipes.quote doesn't work right on Windows, but it does after splitting
51 # shlex.quote doesn't work right on Windows, but it does after splitting
53 if sys.platform.startswith('win'):
52 if sys.platform.startswith('win'):
54 cmd = shlex.split(cmd)
53 cmd = shlex.split(cmd)
55 proc = subprocess.Popen(cmd, shell=True)
54 proc = subprocess.Popen(cmd, shell=True)
General Comments 0
You need to be logged in to leave comments. Login now