def packRequest_pty_req(term, geometry, modes):
 (rows, cols, xpixel, ypixel) = geometry
 termPacked = common.NS(term)
 winSizePacked = struct.pack('>4L', cols, rows, xpixel, ypixel)
 modesPacked = common.NS(modes)
 return ((termPacked + winSizePacked) + modesPacked)

def packRequest_pty_req ( term , geometry , modes ) : ( rows , cols , xpixel , ypixel ) = geometry termPacked = common . NS ( term ) winSizePacked = struct . pack ( '>4L' , cols , rows , xpixel , ypixel ) modesPacked = common . NS ( modes ) return ( ( termPacked + winSizePacked ) + modesPacked )
pack a pty-req request so that it is suitable for sending .