{ "info": { "author": "Tony S. Yu", "author_email": "tsyu80@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: IPython", "Intended Audience :: Developers", "Topic :: Desktop Environment :: File Managers", "Topic :: Utilities" ], "description": "============\npypath-magic\n============\n\n\n``pypath-magic`` provides a simple interface for adding modules and packages\nto your Python path. This page should provide a good overview, but you might\nalso want to check out the\n`original pypath-magic article `_\nand the\n`article introducing the command-line interface `_\n\nUnlike modifications to ``sys.path``, this allows you to easily modify your\npath across sessions. Unlike modifications to environment variables, this\ndoesn't require you to explain to users, students, and colleagues how to modify\nenvironment variables.\n\n\nCommand-line interface\n======================\n\nIn addition to the namesake IPython magic interface, version 0.3 adds a\ncommand-line interface (CLI) that resembles the IPython interface. After\ninstalling the latest version (``pip install pypath_magic``), you'll have\naccess to a ``pypath`` command in your favorite terminal/shell.\n\nAn example IPython workflow with ``pypath-magic`` is described below. The CLI\nhas a similar interface::\n\n pypath [PATH]\n\nThe standard commands are::\n\n pypath add [PATH] Add path to user's Python path.\n pypath delete [PATH] Delete path from user's Python path.\n pypath [list] List all paths defined by user.\n pypath list-all List all paths in user's Python path.\n pypath path-file Print path to user's path file.\n\nContinue below to this in action for the IPython interface.\n\n\nIPython magic\n=============\n\n``pypath-magic`` adds an `IPython magic`_ (err... Jupyter_ magic?) command for\neasily manipulating your Python path. To use the magic command, just load the\nextension from an IPython session:\n\n.. code-block:: python\n\n In [1]: %load_ext pypath_magic\n\nAfter loading, you will have access to the ``%pypath`` magic. You can type:\n\n.. code-block:: python\n\n In [2]: %pypath\n\nto list all the custom paths added by ``pypath-magic``. When you get started,\nyou won't have anything there. To add some custom paths, just change to\na directory and call ``%pypath -a``:\n\n.. code-block:: python\n\n In [3]: %cd path/to/my-repo\n\n In [4]: ls\n data_wranglers.py\n plot_helpers.py\n\n In [5]: %pypath -a\n Added u'/absolute/path/to/my-repo' to path.\n\n In [6]: %pypath\n /absolute/path/to/my-repo\n\nNow you can reuse those helper functions:\n\n.. code-block:: python\n\n In [7]: from plot_helpers import plot_slope_marker\n\nChanges to your python path will persist across IPython sessions, and those\npaths will be available outside of IPython. If you later want to delete\na directory from your path, just use ``%pypath -d``:\n\n.. code-block:: python\n\n In [8]: %cd path/to/my-repo\n\n In [9]: %pypath -d\n Deleted u'/absolute/path/to/my-repo' from path.\n\nYou can also list your entire python path with ``%pypath -l``:\n\n.. code-block:: python\n\n In [10]: %pypath -l\n\n /Users/tonysyu/code/yutils\n /Users/tonysyu/code/skimage\n /Users/tonysyu/code/mpl/lib\n /Users/tonysyu/code/ipython\n /Users/tonysyu/code/deli\n /Users/tonysyu/code/mpltools\n /Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/lib/python27.zip\n /Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/lib/python2.7\n ...\n /absolute/path/to/my-repo\n\nFor additional usage information, type:\n\n.. code-block:: python\n\n In [11]: %pypath?\n\n\nInstall\n=======\n\nTo install using pip::\n\n $ pip install pypath_magic\n\nTo install from source::\n\n $ git clone https://github.com/tonysyu/pypath-magic.git\n $ cd pypath-magic\n $ python setup.py install\n\nIf you get an error like::\n\n error: invalid command 'egg_info'\n\nyou probably need to update ``setuptools``::\n\n pip install --upgrade setuptools\n\n\nDependencies\n============\n\n* Python 2.7/3.4 (older versions probably work, but this is not tested)\n* IPython >= 1.1\n* setuptools >= 0.7\n\n\nLicense\n=======\n\nNew BSD (a.k.a. Modified BSD). See LICENSE_ file in this directory for details.\n\n\n.. _IPython magic:\n http://ipython.org/ipython-doc/dev/interactive/tutorial.html#magic-functions\n.. _Jupyter: http://jupyter.org/\n.. _LICENSE: https://github.com/tonysyu/pypath-magic/blob/master/LICENSE", "description_content_type": null, "docs_url": null, "download_url": "http://tonysyu.github.com/pypath_magic", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://tonysyu.github.com/pypath_magic", "keywords": "PYTHONPATH,utility,IPython", "license": "Modified BSD", "maintainer": null, "maintainer_email": null, "name": "pypath_magic", "package_url": "https://pypi.org/project/pypath_magic/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pypath_magic/", "project_urls": { "Download": "http://tonysyu.github.com/pypath_magic", "Homepage": "http://tonysyu.github.com/pypath_magic" }, "release_url": "https://pypi.org/project/pypath_magic/0.3.1/", "requires_dist": null, "requires_python": null, "summary": "IPython magic and CLI to manipulate the Python path", "version": "0.3.1" }, "last_serial": 1390204, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "77cc26ae725a5680843cf386b75630b7", "sha256": "9cf1826a8daa7299e502bb31bbb0b6d215114b54c33c9ba44d0e91a5ceae19b7" }, "downloads": -1, "filename": "pypath_magic-0.1.tar.gz", "has_sig": false, "md5_digest": "77cc26ae725a5680843cf386b75630b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2375, "upload_time": "2014-08-04T03:48:21", "url": "https://files.pythonhosted.org/packages/ae/3d/c84c56fe12871d5511ac7f54f34dc384158fef363a0ed3a3f03fb3297c9c/pypath_magic-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3007e85d410a5c090cf78f19b3ffb07c", "sha256": "21bfce9f96b162f5175f9d228c5249286bf1d7e5c4ebe2e00f37825eae7f0d71" }, "downloads": -1, "filename": "pypath_magic-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3007e85d410a5c090cf78f19b3ffb07c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4115, "upload_time": "2014-08-04T04:24:39", "url": "https://files.pythonhosted.org/packages/f9/19/f554db09fe16a461fb08c0552a6b1dfb28dd183e598d20eb2dc171e7d005/pypath_magic-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "fde02adeec94f1f650dc72dfc7b17828", "sha256": "cebb015aef872dd4b625430fff374f27d0854216109cc4cb382b8ffb0739d4d0" }, "downloads": -1, "filename": "pypath_magic-0.1.2.tar.gz", "has_sig": false, "md5_digest": "fde02adeec94f1f650dc72dfc7b17828", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4088, "upload_time": "2014-08-05T02:57:21", "url": "https://files.pythonhosted.org/packages/21/fe/68dd7b04fc95c0f0ca5462564d8786543221479f472aa5bbc5bce264ebb4/pypath_magic-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6384f6297ab69c584aac7761d696c2ec", "sha256": "7f1b7bd07f5ad4316f39d48ff8795f15903c4610397c991cde7acc557f24ea2e" }, "downloads": -1, "filename": "pypath_magic-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6384f6297ab69c584aac7761d696c2ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4137, "upload_time": "2014-08-05T04:15:44", "url": "https://files.pythonhosted.org/packages/21/f8/3dbc8de63359a71c751d7c04e96e615e3f42d9f484afa3523e3bbe1c33b0/pypath_magic-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "5b108ae7a473831a9763d779c3c6f531", "sha256": "de6b12bbcb31b1fee79342baa3d6a8385af9e984f482ffa50cfb44ac32912091" }, "downloads": -1, "filename": "pypath_magic-0.2.1.tar.gz", "has_sig": false, "md5_digest": "5b108ae7a473831a9763d779c3c6f531", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4352, "upload_time": "2014-08-06T05:07:09", "url": "https://files.pythonhosted.org/packages/26/b1/07f1ef625a35b8a01306bb5e6f90648a94dc14bcc4bdb8fb8457c4e3480f/pypath_magic-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "686984cffa3771b06b93fa0749945fb9", "sha256": "c94cf9b50b1bf99e4d8d24431eead84392e7b745d0d20feb950f9e3d79c6e6b2" }, "downloads": -1, "filename": "pypath_magic-0.3.0.tar.gz", "has_sig": false, "md5_digest": "686984cffa3771b06b93fa0749945fb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3294, "upload_time": "2015-01-21T06:18:18", "url": "https://files.pythonhosted.org/packages/8d/55/d0d49b4171b2dd42af35e28bc3aa2ec81068f79039db8711cf383adaa81d/pypath_magic-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "226b2c5f52e29f2917d9f72d894916f4", "sha256": "3ed241a879bc365cdbc36bee923a609bd28b37cd28124f4c3edfd4f411b15eec" }, "downloads": -1, "filename": "pypath_magic-0.3.1.tar.gz", "has_sig": false, "md5_digest": "226b2c5f52e29f2917d9f72d894916f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7185, "upload_time": "2015-01-21T06:45:55", "url": "https://files.pythonhosted.org/packages/4f/23/1c59f0c32218888e23f12e6138bd8fc036c6f37fed187488ac418823adc4/pypath_magic-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "226b2c5f52e29f2917d9f72d894916f4", "sha256": "3ed241a879bc365cdbc36bee923a609bd28b37cd28124f4c3edfd4f411b15eec" }, "downloads": -1, "filename": "pypath_magic-0.3.1.tar.gz", "has_sig": false, "md5_digest": "226b2c5f52e29f2917d9f72d894916f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7185, "upload_time": "2015-01-21T06:45:55", "url": "https://files.pythonhosted.org/packages/4f/23/1c59f0c32218888e23f12e6138bd8fc036c6f37fed187488ac418823adc4/pypath_magic-0.3.1.tar.gz" } ] }