()
| 190 | |
| 191 | |
| 192 | def get_editor(): |
| 193 | global editor |
| 194 | if editor is None: |
| 195 | if 'EDITOR' in os.environ: |
| 196 | if os.environ['EDITOR'] in ['vi', 'vim', 'nano', 'pico', 'emacs']: |
| 197 | print("WARNING: You have EDITOR set to %s, which will not work when launched from this tool. Please use an editor that launches a separate window/process" % os.environ['EDITOR']) |
| 198 | editor = os.environ['EDITOR'] |
| 199 | elif is_windows(): |
| 200 | editor = 'notepad.exe' |
| 201 | elif is_mac(): |
| 202 | editor = 'open -a TextEdit' |
| 203 | else: |
| 204 | sys.exit("On Linux you have to set EDITOR variable to a command that will start an editor in its own window") |
| 205 | return editor |
| 206 | |
| 207 | |
| 208 | def check_prerequisites(todo=None): |
no test coverage detected
searching dependent graphs…