def get_pty(self, term='<STR_LIT>', width=<NUM_LIT>, height=<NUM_LIT>):
if self.closed or self.eof_received or self.eof_sent or not self.active:<EOL><INDENT>raise SSHException('<STR_LIT>')<EOL><DEDENT>m = Message()<EOL>m.add_byte(chr(MSG_CHANNEL_REQUEST))<EOL>m.add_int(self.remote_chanid)<EOL>m.add_string('<STR_LIT>')<EOL>m.add_boolean(True)<EOL>m.add_string(term)<EOL>m.add_int(width)<EOL>m.add_int(height)<EOL>m.add_int(<NUM_LIT:0>).add_int(<NUM_LIT:0>)<EOL>m.add_string('<STR_LIT>')<EOL>self._event_pending()<EOL>self.transport._send_user_message(m)<EOL>self._wait_for_event()<EOL>
Request a pseudo-terminal from the server.  This is usually used right
after creating a client channel, to ask the server to provide some
basic terminal semantics for a shell invoked with L{invoke_shell}.
It isn't necessary (or desirable) to call this method if you're going
to exectue a single command with L{exec_command}.

@param term: the terminal type to emulate (for example, C{'vt100'})
@type term: str
@param width: width (in characters) of the terminal screen
@type width: int
@param height: height (in characters) of the terminal screen
@type height: int

@raise SSHException: if the request was rejected or the channel was
    closed