Logo Search packages:      
Sourcecode: ipython version File versions  Download package

def IPython::frontend::wx::wx_frontend::WxController::_on_enter (   self  )  [private]

Called on return key down, in readline input_state.

Definition at line 519 of file wx_frontend.py.

00519                        :
        """ Called on return key down, in readline input_state.
        """
        last_line_num = self.LineFromPosition(self.GetLength())
        current_line_num = self.LineFromPosition(self.GetCurrentPos())
        new_line_pos = (last_line_num - current_line_num)
        if self.debug:
            print >>sys.__stdout__, repr(self.input_buffer)
        self.write('\n', refresh=False)
        # Under windows scintilla seems to be doing funny
        # stuff to the line returns here, but the getter for
        # input_buffer filters this out.
        if sys.platform == 'win32':
            self.input_buffer = self.input_buffer
        old_prompt_num = self.current_prompt_pos
        has_executed = PrefilterFrontEnd._on_enter(self, 
                                            new_line_pos=new_line_pos)
        if old_prompt_num == self.current_prompt_pos:
            # No execution has happened 
            self.GotoPos(self.GetLineEndPosition(current_line_num + 1))
        return has_executed


    #--------------------------------------------------------------------------
    # EditWindow API
    #--------------------------------------------------------------------------

    def OnUpdateUI(self, event):


Generated by  Doxygen 1.6.0   Back to index