# panda3d.core.ConfigPageManager¶

from panda3d.core import ConfigPageManager

class ConfigPageManager

Bases: ConfigFlags

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

Inheritance diagram

loadedImplicitPages() → bool

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

loadImplicitPages() → None

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 reloadImplicitPages().

reloadImplicitPages() → None

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.

getSearchPath() → 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 reloadImplicitPages() called.

Return type

DSearchPath

getNumPrcPatterns() → size_t

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.

Return type

size_t

getPrcPattern(n: size_t) → str

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

getNumPrcEncryptedPatterns() → size_t

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.

Return type

size_t

getPrcEncryptedPattern(n: size_t) → str

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

getNumPrcExecutablePatterns() → size_t

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.

Return type

size_t

getPrcExecutablePattern(n: size_t) → str

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

makeExplicitPage(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.

Return type

ConfigPage

deleteExplicitPage(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).

getNumImplicitPages() → size_t

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

Return type

size_t

getImplicitPage(n: size_t) → ConfigPage

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

Return type

ConfigPage

getNumExplicitPages() → size_t

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.makeExplicitPage().

Return type

size_t

getExplicitPage(n: size_t) → ConfigPage

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

Return type

ConfigPage

output(out: ostream) → None
write(out: ostream) → None
static getGlobalPtr() → ConfigPageManager
Return type

ConfigPageManager