MCPcopy Index your code
hub / github.com/ipython/ipython / get_default_editor

Function get_default_editor

IPython/terminal/interactiveshell.py:105–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103
104
105def get_default_editor():
106 try:
107 return os.environ['EDITOR']
108 except KeyError:
109 pass
110 except UnicodeError:
111 warn("$EDITOR environment variable is not pure ASCII. Using platform "
112 "default editor.")
113
114 if os.name == 'posix':
115 return 'vi' # the only one guaranteed to be there!
116 else:
117 return "notepad" # same in Windows!
118
119
120# conservatively check for tty

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…