MCPcopy Create free account
hub / github.com/ipython/ipython / get_default_editor

Function get_default_editor

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

Source from the content-addressed store, hash-verified

62}
63
64def get_default_editor():
65 try:
66 return os.environ['EDITOR']
67 except KeyError:
68 pass
69 except UnicodeError:
70 warn("$EDITOR environment variable is not pure ASCII. Using platform "
71 "default editor.")
72
73 if os.name == 'posix':
74 return 'vi' # the only one guaranteed to be there!
75 else:
76 return 'notepad' # same in Windows!
77
78# conservatively check for tty
79# overridden streams can result in things like:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected