Index of the script module
-
m
paste.script
...
-
m
appinstall
...
- Provides the two commands for preparing an application:
prepare-app and setup-app
- a Cheetah ...
-
C
AbstractInstallCommand
...
- a default_interactive ...
- a default_sysconfigs ...
- a default_verbosity ...
- a group_name ...
- a hidden ...
- a max_args_error ...
- a min_args_error ...
- a required_args ...
- f call_sysconfig_function ... - Call the specified function in the first sysconfig module it is defined in. NameError if no function is found.
- f call_sysconfig_functions ... - Call all the named functions in the sysconfig modules, returning a list of the return values.
- f get_distribution ... - This gets a distribution object, and installs the distribution if required.
- f get_installer ...
- f get_sysconfig_option ... - Return the value of the given option in the first sysconfig module in which it is found, or default (None) if not found in any.
- f get_sysconfig_options ... - Return the option value for the given name in all the sysconfig modules in which is is found ([] if none).
- f load_sysconfigs ...
- f run ...
- f standard_parser ...
- f sysconfig_install_vars ... - Return the folded results of calling the install_variables() functions.
-
C
Installer
...
- Abstract base class for installers, and also a generic
installer that will run off config files in the .egg-info
directory of a distribution.
- a use_cheetah ...
- f __init__ ...
- f config_content ... - Called by self.write_config, this returns the text content for the config file, given the provided variables.
- f description ...
- f editable_config_files ... - Return a list of filenames; this is primarily used when the filename is treated as a directory and several configuration files are created. The default implementation returns the file itself. Return None if you don't know what files should be edited on installation.
- f setup_config ... - Called to setup an application, given its configuration file/directory.
- f simple_config ... - Return a very simple configuration file for this application.
- f template_renderer ... - Subclasses may override this to provide different template substitution (e.g., use a different template engine).
-
C
MakeConfigCommand
...
- a description ...
- a parser ...
- a summary ...
- a usage ...
- f call_sysconfig_function ... - Call the specified function in the first sysconfig module it is defined in. NameError if no function is found.
- f call_sysconfig_functions ... - Call all the named functions in the sysconfig modules, returning a list of the return values.
- f check_config_file ...
- f get_distribution ... - This gets a distribution object, and installs the distribution if required.
- f get_installer ...
- f get_sysconfig_option ... - Return the value of the given option in the first sysconfig module in which it is found, or default (None) if not found in any.
- f get_sysconfig_options ... - Return the option value for the given name in all the sysconfig modules in which is is found ([] if none).
- f load_sysconfigs ...
- f run ...
- f show_info ...
- f standard_parser ...
- f sysconfig_install_vars ... - Return the folded results of calling the install_variables() functions.
-
C
SetupCommand
...
- a description ...
- a parser ...
- a summary ...
- a usage ...
- f get_distribution ... - This gets a distribution object, and installs the distribution if required.
- f get_installer ...
- f get_sysconfig_option ... - Return the value of the given option in the first sysconfig module in which it is found, or default (None) if not found in any.
- m bool_optparse ... - A subclass of optparse.OptionParser that allows boolean long options (like --verbose) to also take arguments (like --verbose=true). Arguments must use =.
-
m
cgi_server
...
- a stdout ...
- f paste_run_cgi ...
- f run_with_cgi ...
-
m
checkperms
...
- This is a module to check the filesystem for the presence and
permissions of certain files. It can also be used to correct the
permissions (but not existance) of those files.
- a exe_bits ...
- a exe_mask ...
- a full_mask ...
- a modes ...
-
C
PermissionSpec
...
- Represents a set of specifications for permissions.
- a commands ...
- f __init__ ...
- f check ...
- f fix ...
- f parsefile ...
- f parselines ...
- f paths_sorted ...
- f traverse ...
- f traverse_path ...
- f traverse_tree ...
- f calc_mode_diff ... - Gives the difference between the actual mode of the file and the given mode. If keep_exe is true, then if the mode doesn't include any executable information the executable information will simply be ignored. High bits are also always ignored (except suid/sgid and sticky bit).
- f calc_ownership_spec ... - Calculates what a string spec means, returning (uid, username, gid, groupname), where there can be None values meaning no preference.
- f calc_set_mode ... - Calculates the new mode given the current node cur_mode and the mode spec mode and if keep_exe is true then also keep the executable bits in cur_mode if mode has no executable bits in it. Return the new mode.
- f mode_diff ... - Returns the differences calculated using calc_mode_diff
- f ownership_diff ... - Return a list of differences between the ownership of filename and the spec given.
- f read_perm_spec ... - Reads a spec like 'rw-r--r--' into a octal number suitable for chmod. That is characters in groups of three -- first group is user, second for group, third for other (all other people). The characters are r (read), w (write), and x (executable), though the executable can also be s (sticky). Files in sticky directories get the directories permission setting.
- f set_mode ... - Sets the mode on filename using calc_set_mode
- f set_ownership ... - Set the ownership of filename given the spec.
-
m
cherrypy_server
...
- Entry point for CherryPy's WSGI server
- f cpwsgi_server ... - Serves the specified WSGI app via CherryPyWSGIServer.
-
m
command
...
- a dist ...
- a parser ...
- a python_version ...
- a system_plugins ...
- C BadCommand ...
-
C
Command
...
- f __init__ ...
- f ask ... - Prompt the user. Default can be true, false, 'careful' or 'none'. If 'none' then the user must enter y/n. If 'careful' then the user must enter yes/no (long form).
- f challenge ... - Prompt the user for a variable.
- f ensure_dir ... - Ensure that the directory exists, creating it if necessary. Respects verbosity and simulation.
- f ensure_file ... - Ensure a file named filename exists with the given content. If --interactive has been enabled, this will ask the user what to do if a file exists with different content.
- f here ...
- f indent_block ... - Indent the block of text (each line is indented). If you give initial, then that is used in lieue of indent for the first line.
- f insert_into_file ... - Inserts text into the file, right after the given marker. Markers look like: -*- <marker_name>[:]? -*-, and the text will go on the immediately following line.
- f logging_file_config ... - Setup logging via the logging module's fileConfig function with the specified config_file, if applicable.
- f pad ...
- f parse_args ...
- f parse_vars ... - Given variables like ['a=b', 'c=d'] turns it into {'a': 'b', 'c': 'd'}
- f quote_first_command_arg ... - There's a bug in Windows when running an executable that's located inside a path with a space in it. This method handles that case, or on non-Windows systems or an executable with no spaces, it just leaves well enough alone.
- f read_vars ... - Given a configuration filename, this will return a map of values.
- f run ...
- f run_command ... - Runs the command, respecting verbosity and simulation. Returns stdout, or None if simulating.
- f shorten ... - Return a shorted form of the filename (relative to the current directory), typically for displaying in messages. If *paths are present, then use os.path.join to create the full filename before shortening.
- f standard_parser ... - Create a standard OptionParser instance.
- f svn_command ... - Run an svn command, but don't raise an exception if it fails.
- f write_vars ... - Given a configuration filename, this will add items in the vars mapping to the configuration file. Will create the configuration file if it doesn't exist.
-
C
NoDefault
...
-
C
NotFoundCommand
...
- f __init__ ...
- f ensure_dir ... - Ensure that the directory exists, creating it if necessary. Respects verbosity and simulation.
- f here ...
- f indent_block ... - Indent the block of text (each line is indented). If you give initial, then that is used in lieue of indent for the first line.
- f pad ...
- f parse_args ...
- f run_command ... - Runs the command, respecting verbosity and simulation. Returns stdout, or None if simulating.
- f get_commands ...
- f invoke ...
- f parse_exe_file ...
- f popdefault ...
- f run ...
-
m
copydir
...
- a query_usage ...
- a standard_vars ...
- C LaxTemplate ...
-
C
SkipTemplate
...
- Raised to indicate that the template should not be copied over.
Raise this exception during the substitution of your template
- C TypeMapper ...
- f careful_sub ... - Substitutes the template with the variables, using the .body() method if it exists. It assumes that the variables were also passed in via the searchList.
- f copy_dir ... - Copies the source directory to the dest directory.
- f eval_with_catch ...
- f html_quote ...
- f query_interactive ...
- f should_skip_file ... - Checks if a file should be skipped based on its name.
- f skip_template ... - Raise SkipTemplate, which causes copydir to skip the template being processed. If you pass in a condition, only raise if that condition is true (allows you to use this with string.Template)
- f sub_catcher ... - Run a substitution, returning the value. If an error occurs, show the filename. If the error is a NameError, show the variables.
- f substitute_content ...
- f substitute_filename ...
- f svn_makedirs ...
- f test ...
- f url_quote ...
- m create_distro ...
-
m
default_sysconfig
...
- This module contains default sysconfig settings.
- f add_custom_options ... - This method can modify the parser object (which is an optparse.OptionParser instance). This can be used to add new options to the command.
- f default_config_filename ... - This function can return a default filename or directory for the configuration file, if none was explicitly given.
- f install_variables ... - Returns a dictionary of variables for use later in the process (e.g., filling a configuration file). These are combined from all sysconfig files.
- f post_setup_hook ... - This is called at the very end of paster setup-app. You might use it to register an application globally.
-
m
entrypoints
...
-
C
EntryPointCommand
...
- a description ...
- a max_args ...
- a parser ...
- a summary ...
- a usage ...
- f command ...
- f get_entry_point_description ...
- f get_group_description ...
- f get_pattern ...
- f list_entry_points ...
- f print_entry_points_by_group ...
- f show_egg ...
- f wrap ...
- C EntryPointDescription ...
-
C
ErrorDescription
...
-
C
SuperGeneric
...
- f dedent ...
- f super_generic ...
-
C
EntryPointCommand
...
- m epdesc ...
- m exe ...
-
m
filemaker
...
-
C
FileOp
...
- Enhance the ease of file copying/processing from a package into a target
project
- f __init__ ... - Initialize our File operation helper object
- f copy_dir ... - Copy a directory recursively, processing any files within it that need to be processed (end in _tmpl).
- f copy_file ... - Copy a file from the source location to somewhere in the destination.
- f ensure_dir ... - Ensure that the directory exists, creating it if necessary. Respects verbosity and simulation.
- f ensure_file ... - Ensure a file named filename exists with the given content. If --interactive has been enabled, this will ask the user what to do if a file exists with different content.
- f parse_path_name_args ... - Given the name, assume that the first argument is a path/filename combination. Return the name and dir of this. If the name ends with '.py' that will be erased.
- f shorten ... - Return a shorted form of the filename (relative to the current directory), typically for displaying in messages. If *paths are present, then use os.path.join to create the full filename before shortening.
- f svn_command ... - Run an svn command, but don't raise an exception if it fails.
- f popdefault ...
-
C
FileOp
...
- Enhance the ease of file copying/processing from a package into a target
project
-
m
flup_server
...
- f run_ajp_fork ...
- f run_ajp_thread ...
- f run_fcgi_fork ...
- f run_fcgi_thread ...
- f run_scgi_fork ...
- f run_scgi_thread ...
- f warn ...
-
m
grep
...
-
C
GrepCommand
...
- a bad_names ...
- a parser ...
- a summary ...
- a usage ...
- f command ...
- f display ...
- f find_occurance ...
- f found ...
- f module_name ...
- f relative_name ...
- f search_code ...
- f search_dir ...
- f search_file ...
- f search_text ...
-
C
GrepCommand
...
- m help ...
-
m
interfaces
...
- C IAppInstall ... - The interface for objects in the entry point group paste.app_install
-
m
pluginlib
...
- f add_plugin ... - Add the plugin to the given distribution (or spec), in .egg-info/paster_plugins.txt
- f egg_info_dir ...
- f egg_name ...
- f find_egg_info_dir ...
- f get_distro ...
- f load_commands_from_plugins ...
- f load_global_commands ...
- f parse_lines ...
- f remove_plugin ... - Remove the plugin to the given distribution (or spec), in .egg-info/paster_plugins.txt. Raises ValueError if the plugin is not in the file.
- f resolve_plugins ...
-
m
request
...
-
C
RequestCommand
...
- a ARG_OPTIONS ...
- a OTHER_OPTIONS ...
- a description ...
- a parser ...
- a summary ...
- a usage ...
- f command ...
- f parse_args ...
-
C
RequestCommand
...
-
m
serve
...
- a MAXFD ...
-
C
DaemonizeException
...
- C LazyWriter ... - File-like object that opens a file lazily when it is first written to.
-
C
ServeCommand
...
- a description ...
- a parser ...
- a possible_subcommands ...
- a summary ...
- a usage ...
- f change_user_group ...
- f command ...
- f daemonize ...
- f loadserver ...
- f record_pid ...
- f restart_with_monitor ...
- f show_status ...
- f stop_daemon ...
- f ensure_port_cleanup ... - This makes sure any open ports are closed.
- f live_pidfile ... - (pidfile:str) -> int | None Returns an int found in the named file, if there is one, and if there is a running process with that process id. Return None if no such process exists.
- f read_pidfile ...
-
m
templates
...
-
C
BasicPackage
...
- a egg_plugins ...
- a required_templates ...
- a summary ...
- a vars ...
- f check_vars ...
- f module_dir ... - Returns the module directory of this template.
- f post ... - Called after template is applied.
- f print_vars ...
- f run ...
- f template_dir ...
- f write_files ...
-
C
Template
...
- a vars ...
- f check_vars ...
- f pre ... - Called before template is applied.
- f read_vars ...
- f template_dir ...
-
C
var
...
- f __init__ ...
- f full_description ...
- f print_vars ...
- f find_args_in_dir ...
- f find_args_in_template ...
-
C
BasicPackage
...
-
m
testapp
...
- a html_page_template ...
- a html_row_template ...
- a text_page_template ...
- a text_row_template ...
- C TestApplication ... - A test WSGI application, that prints out all the environmental variables, and if you add ?error=t to the URL it will deliberately throw an exception.
- f make_literal ...
- f make_test_application ... - A test WSGI application, that prints out all the environmental variables, and if you add ?error=t to the URL it will deliberately throw an exception.
- m twisted_web2_server ...
-
m
util
...
-
m
logging_config
...
- Configuration functions for the logging package for Python. The core package
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
by Apache's log4j system.
- a DEFAULT_LOGGING_CONFIG_PORT ...
- a RESET_ERROR ...
- f fileConfig ... - Read the logging configuration from a ConfigParser-format file.
- f listen ... - Start up a socket server on the specified port, and listen for new configurations.
- f stopListening ... - Stop the listening server which was created with a call to listen().
-
m
secret
...
- Create random secrets.
- f random_bytes ... - Return a string of the given length. Uses os.urandom if it can, or just pseudo-random numbers otherwise.
- f secret_string ... - Returns a random string of the given length. The string is a base64-encoded version of a set of random bytes, truncated to the given length (and without any newlines).
-
m
uuid
...
- UUID (universally unique identifiers) as specified in RFC 4122.
- a NAMESPACE_DNS ...
- a NAMESPACE_OID ...
- a NAMESPACE_URL ...
- a NAMESPACE_X500 ...
- a RESERVED_FUTURE ...
- a RESERVED_MICROSOFT ...
- a RESERVED_NCS ...
- a RFC_4122 ...
-
C
UUID
...
- Instances of the UUID class represent UUIDs as specified in RFC 4122.
Converting a UUID to a string using str() produces a string in the form
"{12345678-1234-1234-1234-123456789abc}". The UUID constructor accepts
a similar string (braces and hyphens optional), or six integer arguments
(with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and 48-bit values
respectively). UUID objects have the following attributes:
- a bytes ...
- a urn ...
- a variant ...
- a version ...
- f __cmp__ ...
- f __init__ ... - Create a UUID either from a string representation in hexadecimal or from six integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_ver, 8-bit clock_hi_res, 8-bit clock_low, 48-bit node).
- f get_bytes ...
- f get_urn ...
- f get_version ...
- f set_bytes ...
- f set_variant ...
- f set_version ...
- f getaddr ... - Get the hardware address as a 48-bit integer.
- f unixgetaddr ... - Get the hardware address on a Unix machine.
- f uuid1 ... - Generate a UUID based on the time and hardware address.
- f uuid3 ... - Generate a UUID from the MD5 hash of a namespace UUID and a name.
- f uuid4 ... - Generate a random UUID.
- f uuid5 ... - Generate a UUID from the SHA-1 hash of a namespace UUID and a name.
- f wingetaddr ... - Get the hardware address on a Windows machine.
-
m
logging_config
...
- Configuration functions for the logging package for Python. The core package
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
by Apache's log4j system.
-
m
wsgiserver
...
- A high-speed, production ready, thread pooled, generic WSGI server.
- a comma_separated_headers ...
- a quoted_slash ...
- a socket_errors_to_ignore ...
-
C
CherryPyWSGIServer
...
- An HTTP server for WSGI.
- a interrupt ... - Set this to an Exception instance to interrupt the server.
- a protocol ...
- a version ...
-
C
ConnectionClass
...
- An HTTP connection (active socket).
- a environ ...
- a rbufsize ...
-
C
RequestHandlerClass
...
- An HTTP Request (and response).
- f __init__ ...
- f decode_chunked ... - Decode the 'chunked' transfer coding.
- f parse_request ... - Parse the next HTTP request start-line and message-headers.
- f read_headers ... - Read header lines from the incoming stream.
- f respond ... - Call the appropriate WSGI app and write its iterable output.
- f send_headers ... - Assert, process, and send the HTTP response message-headers.
- f simple_response ... - Write a simple response back to the client.
- f start_response ... - WSGI callable to begin the HTTP response.
- f write ... - WSGI callable to write unbuffered data to the client.
- f __init__ ...
- f close ... - Close the socket underlying this connection.
- f communicate ... - Read each request and respond appropriately.
- f __init__ ...
- f bind ... - Create (or recreate) the actual socket object.
- f populate_ssl_environ ... - Create WSGI environ entries to be merged into each request.
- f start ... - Run the server forever.
- f stop ... - Gracefully shutdown a server that is serving forever.
- f tick ... - Accept a new connection and put it on the Queue.
- C N
-
m
appinstall
...
- Provides the two commands for preparing an application:
prepare-app and setup-app