()
| 103 | |
| 104 | |
| 105 | def 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…