Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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!

Table of Contents

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.

Release History

Release History

This version
History Node

0.4.0

History Node

0.3.0

History Node

0.2.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
adduserpath-0.4.0-py2.py3-none-any.whl (8.1 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Sep 28, 2017
adduserpath-0.4.0.tar.gz (9.4 kB) Copy SHA256 Checksum SHA256 Source Sep 28, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting