4444
4545from . import autocomplete
4646from . import inspection
47- from ._py3compat import py3 , prepare_for_exec
47+ from ._py3compat import py3
4848from .clipboard import get_clipboard , CopyFailed
4949from .config import getpreferredencoding
5050from .formatter import Parenthesis
@@ -1169,14 +1169,12 @@ def send_to_external_editor(self, text):
11691169 exited with non-zero"""
11701170
11711171 encoding = getpreferredencoding ()
1172- editor_args = shlex .split (
1173- prepare_for_exec (self .config .editor , encoding )
1174- )
1172+ editor_args = shlex .split (self .config .editor )
11751173 with tempfile .NamedTemporaryFile (suffix = ".py" ) as temp :
11761174 temp .write (text .encode (encoding ))
11771175 temp .flush ()
11781176
1179- args = editor_args + [prepare_for_exec ( temp .name , encoding ) ]
1177+ args = editor_args + [temp .name ]
11801178 if subprocess .call (args ) == 0 :
11811179 with open (temp .name ) as f :
11821180 if py3 :
@@ -1187,11 +1185,8 @@ def send_to_external_editor(self, text):
11871185 return text
11881186
11891187 def open_in_external_editor (self , filename ):
1190- encoding = getpreferredencoding ()
1191- editor_args = shlex .split (
1192- prepare_for_exec (self .config .editor , encoding )
1193- )
1194- args = editor_args + [prepare_for_exec (filename , encoding )]
1188+ editor_args = shlex .split (self .config .editor )
1189+ args = editor_args + [filename ]
11951190 return subprocess .call (args ) == 0
11961191
11971192 def edit_config (self ):
0 commit comments