Cross-platform tool for adding locations to the user PATH, no sudo/runas required!
Project description
Ever wanted to release a cool new app but found it difficult to add its location to PATH for users? Me too! This tool does that for you on all major operating systems and does not require elevated privileges!
Fear not, this only modifies the user PATH; the system PATH is never touched nor even looked at!
Installation
adduserpath is distributed on PyPI as a universal wheel and is available on Linux/macOS and Windows and supports Python 2.6-2.7/3.3+ and PyPy.
$ pip install adduserpath
Commands
Only 3!
$ userpath -h
Usage: userpath [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
append Appends to the user PATH
prepend Prepends to the user PATH
verify Checks if locations are in the user PATH
API
>>> import userpath
>>> location = r'C:\Users\Ofek\Desktop\test'
>>>
>>> userpath.in_current_path(location)
False
>>> userpath.in_new_path(location)
False
>>> userpath.append(location)
True
>>> userpath.in_new_path(location)
True
>>> userpath.need_shell_restart(location)
True
License
userpath is distributed under the terms of both
at your option.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adduserpath-0.4.0.tar.gz.
File metadata
- Download URL: adduserpath-0.4.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d12612a529028a2bda79f5111eab6ba4b787625b3fd8958f47ac9371ea9a76dc
|
|
| MD5 |
cb1cf1377ed08f19ceecea93bf556a07
|
|
| BLAKE2b-256 |
adcb50f2be266f19130308cd705a3556f1d06220a5ca60a446c496a485b12726
|
File details
Details for the file adduserpath-0.4.0-py2.py3-none-any.whl.
File metadata
- Download URL: adduserpath-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3494c0a58b8792c05feccfc3a4d3aee6b02ce469dab33798b4eae7622f631d7d
|
|
| MD5 |
6f7be9ef96db27c847f8325ba20a0cb5
|
|
| BLAKE2b-256 |
e8533035ff330183156e93295f5e83735ae1626ad38e215fdf837fe20ba0fab0
|