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

def paramiko::channel::Channel::resize_pty (   self,
  width = 80,
  height = 24 
)

Resize the pseudo-terminal.  This can be used to change the width and
height of the terminal emulation created in a previous L{get_pty} call.

@param width: new width (in characters) of the terminal screen
@type width: int
@param height: new height (in characters) of the terminal screen
@type height: int
@return: C{True} if the operation succeeded; C{False} if not.
@rtype: bool

Definition at line 253 of file channel.py.

00253                                              :
        """
        Resize the pseudo-terminal.  This can be used to change the width and
        height of the terminal emulation created in a previous L{get_pty} call.

        @param width: new width (in characters) of the terminal screen
        @type width: int
        @param height: new height (in characters) of the terminal screen
        @type height: int
        @return: C{True} if the operation succeeded; C{False} if not.
        @rtype: bool
        """
        if self.closed or self.eof_received or self.eof_sent or not self.active:
            raise SSHException('Channel is not open')
        m = Message()
        m.add_byte(chr(MSG_CHANNEL_REQUEST))
        m.add_int(self.remote_chanid)
        m.add_string('window-change')
        m.add_boolean(1)
        m.add_int(width)
        m.add_int(height)
        m.add_int(0).add_int(0)
        self.event.clear()
        self.transport._send_user_message(m)
        while True:
            self.event.wait(0.1)
            if self.closed:
                return False
            if self.event.isSet():
                return True

    def recv_exit_status(self):


Generated by  Doxygen 1.6.0   Back to index