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

def paramiko::channel::Channel::invoke_subsystem (   self,
  subsystem 
)

Request a subsystem on the server (for example, C{sftp}).  If the
server allows it, the channel will then be directly connected to the
requested subsystem.

When the subsystem finishes, the channel will be closed and can't be
reused.

@param subsystem: name of the subsystem being requested.
@type subsystem: str
@return: C{True} if the operation succeeded; C{False} if not.
@rtype: bool

Definition at line 222 of file channel.py.

00222                                          :
        """
        Request a subsystem on the server (for example, C{sftp}).  If the
        server allows it, the channel will then be directly connected to the
        requested subsystem.
        
        When the subsystem finishes, the channel will be closed and can't be
        reused.

        @param subsystem: name of the subsystem being requested.
        @type subsystem: str
        @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('subsystem')
        m.add_boolean(1)
        m.add_string(subsystem)
        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 resize_pty(self, width=80, height=24):


Generated by  Doxygen 1.6.0   Back to index