Language Features

PySite

Python stdlib module — site. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.abs_paths()Neutral
#
Signature
abs_paths()

Set all module __file__ and __cached__ attributes to an absolute path

.addpackage()Neutral
#
Signature
addpackage(sitedir, name, known_paths)

Process a .pth file within the site-packages directory:

.addsitedir()Neutral
#
Signature
addsitedir(sitedir, known_paths)

Add 'sitedir' argument to sys.path if missing and handle .pth files in

.addsitepackages()Neutral
#
Signature
addsitepackages(known_paths, prefixes)

Add site-packages to sys.path

.addusersitepackages()Neutral
#
Signature
addusersitepackages(known_paths)

Add a per user site-package to sys.path

.check_enableusersite()Neutral
#
Signature
check_enableusersite()

Check if user site directory is safe for inclusion

.enablerlcompleter()Neutral
#
Signature
enablerlcompleter()

Enable default readline configuration on interactive prompts, by

.execsitecustomize()Neutral
#
Signature
execsitecustomize()

Run custom site specific code, if available.

.execusercustomize()Neutral
#
Signature
execusercustomize()

Run custom user specific code, if available.

.getsitepackages()Neutral
#
Signature
getsitepackages(prefixes)

Returns a list containing all global site-packages directories.

Fully-Qualified Names

FQNField
sitefqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import site