environment/lib/python2.7/site-packages/IPython/frontend/terminal/interactiveshell.py
def _should_recompile(self,e):
        """Utility routine for edit_syntax_error"""

        if e.filename in ('<ipython console>','<input>','<string>',
                          '<console>','<BackgroundJob compilation>',
                          None):

            return False
        try:
            if (self.autoedit_syntax and
                not self.ask_yes_no('Return to editor to correct syntax error? '
                              '[Y/n] ','y')):
                return False
        except EOFError:
            return False

        def int0(x):
            try:
                return int(x)
            except TypeError:
                return 0
        # always pass integer line and offset values to editor hook
        try:
            self.hooks.fix_error_editor(e.filename,
                int0(e.lineno),int0(e.offset),e.msg)
        except TryNext:
            warn('Could not open editor')
            return False
        return True
def _should_recompile(self,e):
        if e.filename in ('<ipython console>','<input>','<string>',
                          '<console>','<BackgroundJob compilation>',
                          None):

            return False
        try:
            if (self.autoedit_syntax and
                not self.ask_yes_no('Return to editor to correct syntax error? '
                              '[Y/n] ','y')):
                return False
        except EOFError:
            return False

        def int0(x):
            try:
                return int(x)
            except TypeError:
                return 0
        # always pass integer line and offset values to editor hook
        try:
            self.hooks.fix_error_editor(e.filename,
                int0(e.lineno),int0(e.offset),e.msg)
        except TryNext:
            warn('Could not open editor')
            return False
        return True
def _should_recompile ( self , e ) : if e . filename in ( '<ipython console>' , '<input>' , '<string>' , '<console>' , '<BackgroundJob compilation>' , None ) : return False try : if ( self . autoedit_syntax and not self . ask_yes_no ( 'Return to editor to correct syntax error? ' '[Y/n] ' , 'y' ) ) : return False except EOFError : return False def int0 ( x ) : try : return int ( x ) except TypeError : return 0 # always pass integer line and offset values to editor hook try : self . hooks . fix_error_editor ( e . filename , int0 ( e . lineno ) , int0 ( e . offset ) , e . msg ) except TryNext : warn ( 'Could not open editor' ) return False return True
Utility routine for edit_syntax_error
Utility routine for edit_syntax_error