Package paramiko :: Module py3compat
[frames] | no frames]

Module py3compat

source code

Classes
  string_types
Type basestring cannot be instantiated; it is the base for str and unicode.
  text_type
unicode(object='') -> unicode object unicode(string[, encoding[, errors]]) -> unicode object
  bytes
str(object='') -> string
  bytes_types
str(object='') -> string
  long
long(x=0) -> long long(x, base=10) -> long
Functions
string
input(prompt=...)
Read a string from standard input.
 
decodebytes(s)
Decode a string.
 
encodebytes(s)
Encode a string into multiple lines of base-64 data.
 
bytestring(s) source code
integer
byte_ord(c)
Return the integer ordinal of a one-character string.
character
byte_chr(i)
Return a string of one character with ordinal i; 0 <= i < 256.
 
byte_mask(c, mask) source code
 
b(s, encoding='utf8')
cast unicode or bytes to bytes
source code
 
u(s, encoding='utf8')
cast bytes or unicode to unicode
source code
 
b2s(s) source code
 
StringIO(s=...)
Return a StringIO-like stream for reading or writing
 
BytesIO(s=...)
Return a StringIO-like stream for reading or writing
 
is_callable(c) source code
 
next(c) source code
Variables
  PY2 = True
  integer_types = (<type 'int'>, <type 'long'>)
  MAXSIZE = 9223372036854775807
Function Details

input(prompt=...)

 

Read a string from standard input. The trailing newline is stripped. If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError. On Unix, GNU readline is used if enabled. The prompt string, if given, is printed without a trailing newline before reading.

Returns: string