path_remove

typhon.utils.path_remove(dirname, path='PATH')[source]

Remove a directory from environment path variable.

Remove entries from colon-separated variables (e.g. the system path). If the path variable is not set, nothing is done.

Parameters:
  • dirname (str) – Directory to add to the path.

  • path (str) – Name of the path variable to append to. Defaults to the system path ‘PATH’.