module loghelper.sys_helper

Inheritance diagram of pyquickhelper.loghelper.sys_helper

Short summary

module pyquickhelper.loghelper.sys_helper

Helpers around functions in sys.

source on GitHub

Classes

class

truncated documentation

python_path_append

Appends one path into PYTHONPATH.

sys_path_append

Stores the content of sys.path and restores it afterwards.

Methods

method

truncated documentation

__enter__

Modifies os.environ['PYTHONPATH'].

__enter__

Modifies sys.path.

__exit__

Restores``sys.path``.

__exit__

Restores``sys.path``.

__init__

__init__

Documentation

Helpers around functions in sys.

source on GitHub

class pyquickhelper.loghelper.sys_helper.python_path_append(paths, first=False)[source][source]

Bases: object

Appends one path into PYTHONPATH.

source on GitHub

Parameters
  • paths – paths to add

  • first – where to add it, first or last position

source on GitHub

__enter__()[source][source]

Modifies os.environ['PYTHONPATH'].

source on GitHub

__exit__(exc_type, exc_value, traceback)[source][source]

Restores``sys.path``.

source on GitHub

__init__(paths, first=False)[source][source]
Parameters
  • paths – paths to add

  • first – where to add it, first or last position

source on GitHub

class pyquickhelper.loghelper.sys_helper.sys_path_append(paths, position=-1)[source][source]

Bases: object

Stores the content of sys.path and restores it afterwards.

source on GitHub

Parameters
  • paths – paths to add

  • position – where to add it

source on GitHub

__enter__()[source][source]

Modifies sys.path.

source on GitHub

__exit__(exc_type, exc_value, traceback)[source][source]

Restores``sys.path``.

source on GitHub

__init__(paths, position=-1)[source][source]
Parameters
  • paths – paths to add

  • position – where to add it

source on GitHub