9.1. pyopus.misc.env — Login shell environment

Login shell environment access module

This module portably handles environmental varibales. On some systems (Windows) the environment is the same for all applications. In Linux the environment depends on the type of the shell (login or non-login).

Usually only the login shell provides the full environment. This module imports the environmental variables by spawaning user’s login shell and collecting the environment from it.

Under Windows this is a trivial module. After being imported under Linux this module spawns a login shell, runs python env.py and collects the environment on standard output.

If this module is run (with python env.py) it dumps the environment in form of a hex dumped (binascii.b2a_hex()) pickled dictionary (cPickle.dumps()) to standard output and exits.

pyopus.misc.env.environ

A dictionary with variable name for key holding the login shell’s environment.

Not automatically imported to the main PyOPUS module.

Previous topic

9. pyopus.misc — Misclellaneous functions

Next topic

9.2. pyopus.misc.identify — Process, location, and revision identifiers

This Page