Skip to content

One of the best Python package to manipulate the `PATH` environment variable.

License

Notifications You must be signed in to change notification settings

foxypiratecove37350/pathenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pathenv

A Python package for manipulating the PATH environment variable.

Installation

pip install pathenv

Usage

from pathenv import add_to_path, remove_from_path, refresh_path

# Add a new directory to the PATH
add_to_path("/path/to/new/directory")

# Remove a directory from the PATH
remove_from_path("/path/to/old/directory")

# Refresh the PATH
refresh_path()

Features

  • Cross-platform: Works on Windows, Linux, and macOS.
  • Simple API: Easy to use with a few functions.
  • Safe: Doesn't modify the system PATH without your consent.
  • Well-tested: Thoroughly tested for reliability.

Examples

Add a directory to the PATH

from pathenv import add_to_path

add_to_path("/usr/local/bin")

Remove a directory from the PATH

from pathenv import remove_from_path

remove_from_path("/usr/local/bin")

Refresh the PATH

from pathenv import refresh_path

refresh_path()

Documentation

For more detailed documentation, please refer to the API documentation.

License

pathenv is released under the GNU General Public License v2.0.

About

One of the best Python package to manipulate the `PATH` environment variable.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages