ConfigPageManager

from panda3d.core import ConfigPageManager
class ConfigPageManager

Bases:

Bases: ConfigFlags

A global object that maintains the set of ConfigPages everywhere in the world, and keeps them in sorted order.

Inheritance diagram

Inheritance diagram of ConfigPageManager

delete_explicit_page(page: ConfigPage) bool

Removes a previously-constructed ConfigPage from the set of active pages, and deletes it. The ConfigPage object is no longer valid after this call. Returns true if the page is successfully deleted, or false if it was unknown (which should never happen if the page was legitimately constructed).

property explicit_pages Sequence[ConfigPage]

Returns the nth explicit ConfigPage in the world. See get_num_explicit_pages().

get_explicit_page(n: int) ConfigPage

Returns the nth explicit ConfigPage in the world. See get_num_explicit_pages().

static get_global_ptr() ConfigPageManager
get_implicit_page(n: int) ConfigPage

Returns the nth implicit ConfigPage in the world. See get_num_implicit_pages().

get_num_explicit_pages() int

Returns the current number of explicitly-loaded ConfigPages in the world. These represent pages that were loaded dynamically at runtime by explicit calls to ConfigPageManager.make_explicit_page().

get_num_implicit_pages() int

Returns the current number of implicitly-loaded ConfigPages in the world. These represent files that were automatically discovered on the disk as .prc files.

get_num_prc_encrypted_patterns() int

Returns the number of patterns, like *.pre, that are compiled in that will be searched for as special config files that are understood to be encrypted.

get_num_prc_executable_patterns() int

Returns the number of patterns, like *.exe, that are compiled in that will be searched for as special config files that are to be executed as a program, and their output taken to be input. This is normally empty.

get_num_prc_patterns() int

Returns the number of patterns, like *.prc, that are compiled in that will be searched for as default config filenames. Normally there is only one pattern, and it is *.prc, but others may be specified with the PRC_FILENAME variable in Config.pp.

get_prc_encrypted_pattern(n: int) str

Returns the nth filename pattern that will be considered a match as a valid encrypted config file. See get_num_prc_encrypted_patterns().

get_prc_executable_pattern(n: int) str

Returns the nth filename pattern that will be considered a match as a valid executable-style config file. See get_num_prc_executable_patterns().

get_prc_pattern(n: int) str

Returns the nth filename pattern that will be considered a match as a valid config file. See get_num_prc_patterns().

get_search_path() DSearchPath

Returns the search path used to locate implicit .prc files. This is determined by the PRC_DIR and PRC_PATH environment variables. The object returned by this method may be modified to change the path at runtime, and then reload_implicit_pages() called.

property implicit_pages Sequence[ConfigPage]

Returns the nth implicit ConfigPage in the world. See get_num_implicit_pages().

load_implicit_pages()

Searches the PRC_DIR and/or PRC_PATH directories for *.prc files and loads them in as pages. This is normally called automatically at startup time, when the first variable’s value is referenced. See also reload_implicit_pages().

loaded_implicit_pages() bool

Returns true if the implicit *.prc files have already been loaded, false otherwise. Normally this will only be false briefly before startup.

make_explicit_page(name: str) ConfigPage

Creates and returns a new, empty ConfigPage. This page will be stacked on top of any pages that were created before; it may shadow variable declarations that are defined in previous pages.

output(out: ostream)
property prc_encrypted_patterns Sequence[string]

Returns the nth filename pattern that will be considered a match as a valid encrypted config file. See get_num_prc_encrypted_patterns().

property prc_executable_patterns Sequence[string]

Returns the nth filename pattern that will be considered a match as a valid executable-style config file. See get_num_prc_executable_patterns().

property prc_patterns Sequence[string]

Returns the nth filename pattern that will be considered a match as a valid config file. See get_num_prc_patterns().

reload_implicit_pages()

Searches the PRC_DIR and/or PRC_PATH directories for *.prc files and loads them in as pages.

This may be called after startup, to force the system to re-read all of the implicit prc files.

property search_path DSearchPath

Returns the search path used to locate implicit .prc files. This is determined by the PRC_DIR and PRC_PATH environment variables. The object returned by this method may be modified to change the path at runtime, and then reload_implicit_pages() called.

write(out: ostream)