OpenQuizz
Une application de gestion des contenus pédagogiques
pip._vendor.distlib.compat Namespace Reference

Data Structures

class  BaseConfigurator
 
class  CertificateError
 
class  ChainMap
 
class  Container
 
class  ConvertingDict
 
class  ConvertingList
 
class  ConvertingTuple
 
class  OrderedDict
 
class  ZipExtFile
 
class  ZipFile
 

Functions

def quote (s)
 
def splituser (host)
 
def match_hostname (cert, hostname)
 
def which (cmd, mode=os.F_OK|os.X_OK, path=None)
 
def python_implementation ()
 
def callable (obj)
 
def fsencode (filename)
 
def fsdecode (filename)
 
def detect_encoding (readline)
 
def cache_from_source (path, debug_override=None)
 
def valid_ident (s)
 
def pop (self, key, default=None)
 

Variables

 ssl
 
 string_types
 
 text_type
 
 raw_input
 
 filter
 
 ZipFile
 
 callable
 
 fsencode
 
 fsdecode
 
 cookie_re
 
 unescape
 
 IDENTIFIER
 

Function Documentation

◆ cache_from_source()

def pip._vendor.distlib.compat.cache_from_source (   path,
  debug_override = None 
)

◆ callable()

def pip._vendor.distlib.compat.callable (   obj)

◆ detect_encoding()

def pip._vendor.distlib.compat.detect_encoding (   readline)
The detect_encoding() function is used to detect the encoding that should
be used to decode a Python source file.  It requires one argument, readline,
in the same way as the tokenize() generator.

It will call readline a maximum of twice, and return the encoding used
(as a string) and a list of any lines (left as bytes) it has read in.

It detects the encoding from the presence of a utf-8 bom or an encoding
cookie as specified in pep-0263.  If both a bom and a cookie are present,
but disagree, a SyntaxError will be raised.  If the encoding cookie is an
invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
'utf-8-sig' is returned.

If no encoding is specified, then the default of 'utf-8' will be returned.

◆ fsdecode()

def pip._vendor.distlib.compat.fsdecode (   filename)

◆ fsencode()

def pip._vendor.distlib.compat.fsencode (   filename)

◆ match_hostname()

def pip._vendor.distlib.compat.match_hostname (   cert,
  hostname 
)
Verify that *cert* (in decoded format as returned by
SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
rules are followed, but IP addresses are not accepted for *hostname*.

CertificateError is raised on failure. On success, the function
returns nothing.

◆ pop()

def pip._vendor.distlib.compat.pop (   self,
  key,
  default = None 
)

◆ python_implementation()

def pip._vendor.distlib.compat.python_implementation ( )
Return a string identifying the Python implementation.

◆ quote()

def pip._vendor.distlib.compat.quote (   s)

◆ splituser()

def pip._vendor.distlib.compat.splituser (   host)
splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.

◆ valid_ident()

def pip._vendor.distlib.compat.valid_ident (   s)

◆ which()

def pip._vendor.distlib.compat.which (   cmd,
  mode = os.F_OK | os.X_OK,
  path = None 
)
Given a command, mode, and a PATH string, return the path which
conforms to the given mode on the PATH, or None if there is no such
file.

`mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
of os.environ.get("PATH"), or can be overridden with a custom search
path.

Variable Documentation

◆ callable

callable

◆ cookie_re

cookie_re

◆ filter

filter

◆ fsdecode

fsdecode

◆ fsencode

fsencode

◆ IDENTIFIER

IDENTIFIER

◆ raw_input

raw_input

◆ ssl

ssl

◆ string_types

string_types

◆ text_type

text_type

◆ unescape

unescape

◆ ZipFile