|
|
@ -188,7 +188,9 @@ def editor_input(editor, initial="", suffix=None):
|
|
|
|
tfile_name = temp_file.name
|
|
|
|
tfile_name = temp_file.name
|
|
|
|
temp_file.write(initial)
|
|
|
|
temp_file.write(initial)
|
|
|
|
temp_file.flush()
|
|
|
|
temp_file.flush()
|
|
|
|
subprocess.call([editor, tfile_name])
|
|
|
|
cmd = editor.split() # this enable editor command with option, e.g. gvim -f
|
|
|
|
|
|
|
|
cmd.append(tfile_name)
|
|
|
|
|
|
|
|
subprocess.call(cmd)
|
|
|
|
with open(tfile_name) as temp_file:
|
|
|
|
with open(tfile_name) as temp_file:
|
|
|
|
content = temp_file.read()
|
|
|
|
content = temp_file.read()
|
|
|
|
os.remove(tfile_name)
|
|
|
|
os.remove(tfile_name)
|
|
|
|