PyDocs

Nav

Python Runtime Services

StartupState.addsitedir

  • StartupState.addsitedir(sitedir)
Add a site directory and accumulate its .pth and .start startup data.

Read the .pth and .start files in *sitedir* and record their
sys.path extensions, deprecated .pth import lines, and .start entry
points on this state.  The recorded data is not applied until
process() is called.

Typically used to batch multiple site directories before a single
process() call, so that every sys.path extension is visible before
any startup code runs.  Reentrant calls reached from a .start entry
point or an exec'd .pth import line must not mutate the state
currently being processed; for those cases, use site.addsitedir()
instead, which always creates a fresh per-call state.
0 Examples
No examples for site/StartupState.addsitedir.
See Also
No see-alsos for site/StartupState.addsitedir
0 Notes
No notes for StartupState.addsitedir