OpenQuizz
Une application de gestion des contenus pédagogiques
click._compat Namespace Reference

Data Structures

class  _AtomicFile
 
class  _FixupStream
 
class  _NonClosingTextIOWrapper
 

Functions

def get_filesystem_encoding ()
 
def is_ascii_encoding (encoding)
 
def get_best_encoding (stream)
 
def is_bytes (x)
 
def set_binary_mode (f)
 
def isidentifier (x)
 
def get_binary_stdin ()
 
def get_binary_stdout ()
 
def get_binary_stderr ()
 
def get_text_stdin (encoding=None, errors=None)
 
def get_text_stdout (encoding=None, errors=None)
 
def get_text_stderr (encoding=None, errors=None)
 
def filename_to_ui (value)
 
def get_streerror (e, default=None)
 
def open_stream (filename, mode="r", encoding=None, errors="strict", atomic=False)
 
def strip_ansi (value)
 
def should_strip_ansi (stream=None, color=None)
 
def raw_input (prompt="")
 
def auto_wrap_for_ansi (stream, color=None)
 
def term_len (x)
 
def isatty (stream)
 

Variables

int PY2 = 2
 
 CYGWIN = sys.platform.startswith("cygwin")
 
 MSYS2 = sys.platform.startswith("win") and ("GCC" in sys.version)
 
string APP_ENGINE
 
string WIN = sys.platform.startswith("win") and not APP_ENGINE and not MSYS2
 
int DEFAULT_COLUMNS = 80
 
 text_type = unicode
 
 raw_input = raw_input
 
tuple string_types = (str, unicode)
 
tuple int_types = (int, long)
 
 iteritems = lambda x: x.iteritems()
 
 range_type = xrange
 
def isidentifier = lambda x: x.isidentifier()
 
 auto_wrap_for_ansi = None
 
 colorama = None
 
 get_winterm_size = None
 
dictionary binary_streams
 
dictionary text_streams
 

Function Documentation

◆ auto_wrap_for_ansi()

def click._compat.auto_wrap_for_ansi (   stream,
  color = None 
)
This function wraps a stream so that calls through colorama
are issued to the win32 console API to recolor on demand.  It
also ensures to reset the colors if a write call is interrupted
to not destroy the console afterwards.

◆ filename_to_ui()

def filename_to_ui (   value)

◆ get_best_encoding()

def click._compat.get_best_encoding (   stream)
Returns the default stream encoding if not found.

◆ get_binary_stderr()

def get_binary_stderr ( )

◆ get_binary_stdin()

def get_binary_stdin ( )

◆ get_binary_stdout()

def get_binary_stdout ( )

◆ get_filesystem_encoding()

def click._compat.get_filesystem_encoding ( )

◆ get_streerror()

def click._compat.get_streerror (   e,
  default = None 
)

◆ get_text_stderr()

def get_text_stderr (   encoding = None,
  errors = None 
)

◆ get_text_stdin()

def get_text_stdin (   encoding = None,
  errors = None 
)

◆ get_text_stdout()

def get_text_stdout (   encoding = None,
  errors = None 
)

◆ is_ascii_encoding()

def click._compat.is_ascii_encoding (   encoding)
Checks if a given encoding is ascii.

◆ is_bytes()

def is_bytes (   x)

◆ isatty()

def click._compat.isatty (   stream)

◆ isidentifier()

def click._compat.isidentifier (   x)

◆ open_stream()

def click._compat.open_stream (   filename,
  mode = "r",
  encoding = None,
  errors = "strict",
  atomic = False 
)

◆ raw_input()

def click._compat.raw_input (   prompt = "")

◆ set_binary_mode()

def set_binary_mode (   f)

◆ should_strip_ansi()

def click._compat.should_strip_ansi (   stream = None,
  color = None 
)

◆ strip_ansi()

def click._compat.strip_ansi (   value)

◆ term_len()

def click._compat.term_len (   x)

Variable Documentation

◆ APP_ENGINE

string APP_ENGINE
Initial value:
1 = "APPENGINE_RUNTIME" in os.environ and "Development/" in os.environ.get(
2  "SERVER_SOFTWARE", ""
3 )

◆ auto_wrap_for_ansi

auto_wrap_for_ansi = None

◆ binary_streams

dictionary binary_streams
Initial value:
1 = {
2  "stdin": get_binary_stdin,
3  "stdout": get_binary_stdout,
4  "stderr": get_binary_stderr,
5 }

◆ colorama

colorama = None

◆ CYGWIN

CYGWIN = sys.platform.startswith("cygwin")

◆ DEFAULT_COLUMNS

int DEFAULT_COLUMNS = 80

◆ get_winterm_size

def get_winterm_size = None

◆ int_types

tuple int_types = (int, long)

◆ isidentifier

def isidentifier = lambda x: x.isidentifier()

◆ iteritems

iteritems = lambda x: x.iteritems()

◆ MSYS2

MSYS2 = sys.platform.startswith("win") and ("GCC" in sys.version)

◆ PY2

int PY2 = 2

◆ range_type

range_type = xrange

◆ raw_input

raw_input = raw_input

◆ string_types

tuple string_types = (str, unicode)

◆ text_streams

dictionary text_streams
Initial value:
1 = {
2  "stdin": get_text_stdin,
3  "stdout": get_text_stdout,
4  "stderr": get_text_stderr,
5 }

◆ text_type

text_type = unicode

◆ WIN

string WIN = sys.platform.startswith("win") and not APP_ENGINE and not MSYS2