跨平台工具,用于将位置添加到用户PATH,无需sudo/runas权限!
项目描述
是否曾经想要发布一个酷炫的新应用程序,但发现很难将其位置添加到用户的PATH中?我也是!这个工具为您在所有主流操作系统上完成这个任务,并且不需要提升权限!
不必担心,这个工具仅修改用户PATH;系统PATH从未被修改,甚至从未查看过!
安装
adduserpath作为通用wheel在PyPI上分发,适用于Linux/macOS和Windows,并支持Python 2.6-2.7/3.3+和PyPy。
$ pip install adduserpath
命令
只有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
许可证
userpath根据您的选择以MIT许可证和Apache许可证2.0的条款分发。
任选其一。
项目详情
关闭
adduserpath-0.4.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d12612a529028a2bda79f5111eab6ba4b787625b3fd8958f47ac9371ea9a76dc |
|
MD5 | cb1cf1377ed08f19ceecea93bf556a07 |
|
BLAKE2b-256 | adcb50f2be266f19130308cd705a3556f1d06220a5ca60a446c496a485b12726 |
关闭
adduserpath-0.4.0-py2.py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3494c0a58b8792c05feccfc3a4d3aee6b02ce469dab33798b4eae7622f631d7d |
|
MD5 | 6f7be9ef96db27c847f8325ba20a0cb5 |
|
BLAKE2b-256 | e8533035ff330183156e93295f5e83735ae1626ad38e215fdf837fe20ba0fab0 |