|
|
|
|
|
content_disposition(type=None,
filename=None)
Generate a properly escaped Content-Disposition header. |
source code
|
|
|
|
getuser()
Retrieve the identity of the process owner |
source code
|
|
|
|
|
|
|
|
|
|
read_file(path,
mode='r')
Read a file and return its content. |
source code
|
|
|
|
create_file(path,
data='',
mode='w')
Create a new file with the given data. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
create_zipinfo(filename,
mtime=None,
dir=False,
executable=False,
symlink=False,
comment=None)
Create a instance of ZipInfo. |
source code
|
|
|
|
|
|
|
|
|
|
makedirs(path,
overwrite=False)
Create as many directories as necessary to make path exist. |
source code
|
|
|
|
copytree(src,
dst,
symlinks=False,
skip=[],
overwrite=False)
Recursively copy a directory tree using copy2() (from shutil.copytree.) |
source code
|
|
|
|
is_path_below(path,
parent)
Return True iff path is equal to parent or is located below parent
at any level. |
source code
|
|
|
|
fq_class_name(obj)
Return the fully qualified class name of given object. |
source code
|
|
|
|
arity(f)
Return the number of arguments expected by the given function, unbound
or bound method. |
source code
|
|
|
|
get_last_traceback()
Retrieve the last traceback as an unicode string. |
source code
|
|
|
|
get_lines_from_file(filename,
lineno,
context=0,
globals=None)
Return content number of lines before and after the specified
lineno from the (source code) file identified by filename. |
source code
|
|
|
|
get_frame_info(tb)
Return frame information for a traceback. |
source code
|
|
|
|
|
|
|
|
|
|
get_doc(obj)
Return the docstring of an object as a tuple (summary, description),
where summary is the first paragraph and description is the remaining
text. |
source code
|
|
|
|
|
|
|
get_module_path(module)
Return the base path the given module is imported from |
source code
|
|
|
|
get_sources(path)
Return a dictionary mapping Python module source paths to the
distributions that contain them. |
source code
|
|
|
|
|
|
|
get_module_metadata(module)
Get a dictionary containing metadata for a module. |
source code
|
|
|
|
|
|
|
hex_entropy(digits=32)
Generate digits number of hex digits of entropy. |
source code
|
|
|
|
salt(length=2)
Returns a string of length random letters and numbers. |
source code
|
|
|
|
md5crypt(password,
salt,
magic='$1$')
Based on FreeBSD src/lib/libcrypt/crypt.c 1.2 |
source code
|
|
|
|
to_ranges(revs)
Converts a list of revisions to a minimal set of ranges. |
source code
|
|
|
|
|
|
|
|
|
|
as_int(s,
default=None,
min=None,
max=None)
Convert s to an int and limit it to the given range, or return default
if unsuccessful. |
source code
|
|
|
|
as_float(s,
default=None,
min=None,
max=None)
Convert s to a float and limit it to the given range, or return default
if unsuccessful. |
source code
|
|
|
|
|
|
|
pathjoin(*args)
Strip / from the arguments and join them with a single /. |
source code
|
|
|
|
to_list(splittable,
sep=',')
Split a string at sep and return a list without any empty items. |
source code
|
|
|
|
sub_val(the_list,
item_to_remove,
item_to_add)
Substitute an item if the item is found in a list, otherwise leave
the list unmodified. |
source code
|
|