'Edit script'

def edit_script(self, filename=None, goto=(-1)):

    if ((not hasattr(self, 'main')) or (not hasattr(self.main, 'editor'))):
        self.shell.external_editor(filename, goto)
        return
    if (filename is not None):
        self.edit_goto.emit(osp.abspath(filename), goto, '')
