@open_only<EOL><INDENT>def get_pty(<EOL>self,<EOL>term="<STR_LIT>",<EOL>width=<NUM_LIT>,<EOL>height=<NUM_LIT>,<EOL>width_pixels=<NUM_LIT:0>,<EOL>height_pixels=<NUM_LIT:0>,<EOL>):<DEDENT>
m = Message()<EOL>m.add_byte(cMSG_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(width_pixels)<EOL>m.add_int(height_pixels)<EOL>m.add_string(bytes())<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 `invoke_shell`.
It isn't necessary (or desirable) to call this method if you're going
to execute a single command with `exec_command`.

:param str term: the terminal type to emulate
    (for example, ``'vt100'``)
:param int width: width (in characters) of the terminal screen
:param int height: height (in characters) of the terminal screen
:param int width_pixels: width (in pixels) of the terminal screen
:param int height_pixels: height (in pixels) of the terminal screen

:raises:
    `.SSHException` -- if the request was rejected or the channel was
    closed