def open_with_editor(filepath):
 editor_cmd = editor().split()
 try:
  subprocess.call((editor_cmd + [filepath]))
 except OSError:
  die(('Could not launch ' + editor()))

def open_with_editor ( filepath ) : editor_cmd = editor ( ) . split ( ) try : subprocess . call ( ( editor_cmd + [ filepath ] ) ) except OSError : die ( ( 'Could not launch ' + editor ( ) ) )
open filepath using the editor specified by the environment variables .