{ "info": { "author": "Antonio Cuni", "author_email": "anto.cuni@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Utilities" ], "description": ".. -*- encoding: utf-8 -*-\n.. -*- restructuredtext -*-\n\n\nfancycompleter: colorful Python TAB completion\n===============================================\n\nWhat is is?\n-----------\n\n``fancycompleter`` is a module to improve your experience in Python by adding\nTAB completion to the interactive prompt. It is an extension of the stdlib's\nrlcompleter_ module.\n\nIts best feature is that the completions are displayed in different colors,\ndepending on their type:\n\n.. image:: http://bitbucket.org/antocuni/fancycompleter/raw/5bf506e05ce7/screenshot.png\n\nIn the image above, strings are shown in green, functions in blue, integers\nand boolean in yellows, ``None`` in gray, types and classes in\nfuchsia. Everything else is plain white.\n\n``fancycompleter`` is compatible with Python 3. However, by default colors\ndon't work on Python 3, see the section `How do I get colors?`_ for details.\n\nOther features\n--------------\n\n* To save space on screen, ``fancycompleter`` only shows the characters \"after\n the dot\". By contrast, in the example above ``rlcompleter`` shows\n everything prepended by \"``sys.``\".\n\n* If we press ```` at the beginning of the line, a real tab character is\n inserted, instead of trying to complete. This is useful when typing\n function bodies or multi-line statements at the prompt.\n\n* Unlike ``rlcompleter``, ``fancycompleter`` **does** complete expressions\n containing dictionary or list indexing. For example,\n ``mydict['foo'].`` works (assuming that ``mydict`` is a dictionary and\n that it contains the key ``'foo'``, of course :-)).\n\n* Starting from Python 2.6, if the completed name is a callable,\n ``rlcompleter`` automatically adds an open parenthesis ``(``. This is\n annoying in case we do not want to really call it, so ``fancycompleter``\n disable this behaviour.\n\nInstallation\n------------\n\nFirst, install the module with ``pip`` or ``easy_install``::\n\n $ pip install fancycompleter\n\nThen, at the Python interactive prompt::\n\n >>> import fancycompleter\n >>> fancycompleter.interact(persist_history=True)\n >>>\n\nIf you want to enable ``fancycompleter`` automatically at startup, you can add\nthose two lines at the end of your `PYTHONSTARTUP`_ script.\n\nIf you do **not** have a `PYTHONSTARTUP_` script, the following command will\ncreate one for you in ``~/python_startup.py``::\n\n $ python -m fancycompleter install\n\nOn Windows, ``install`` automatically sets the ``PYTHONSTARTUP`` environment\nvariable. On other systems, you need to add the proper command in\n``~/.bashrc`` or equivalent.\n\n**Note**: depending on your particular system, ``interact`` might need to play\ndirty tricks in order to display colors, although everything should \"just\nwork\u2122\". In particular, the call to ``interact`` should be the last line in\nthe startup file, else the next lines might not be executed. See section `What\nis really going on?`_ for details.\n\nHow do I get colors?\n---------------------\n\nIf you are using **PyPy**, you can stop reading now, as ``fancycompleter`` will\nwork out of the box.\n\nIf you are using **CPython on Linux/OSX** and you installed ``fancycompleter``\nwith ``pip`` or ``easy_install``, they automatically installed ``pyrepl`` as a\nrequirement, and you should also get colors out of the box. If for some\nreason you don't want to use ``pyrepl``, you should keep on reading.\n\nBy default, in CPython line input and TAB completion are handled by `GNU\nreadline`_ (at least on Linux). However, ``readline`` explicitly strips\nescape sequences from the completions, so completions with colors are not\ndisplayed correctly.\n\nThere are two ways to solve it:\n\n * (suggested) don't use ``readline`` at all and rely on pyrepl_\n\n * use a patched version of ``readline`` to allow colors\n\nBy default, ``fancycompleter`` tries to use ``pyrepl`` if it finds it. To get\ncolors you need a recent version, >= 0.8.2.\n\nStarting from version 0.6.1, ``fancycompleter`` works also on **Windows**, relying\non pyreadline_. At the moment of writing, the latest version of ``pyreadline``\nis 2.1, which does **not** support colored completions; here is the `pull\nrequest`_ which adds support for them. To enable colors, you can install\n``pyreadline`` from `this fork`_ using the following command::\n\n pip install --upgrade https://github.com/antocuni/pyreadline/tarball/master\n\n.. _`pull request`: https://github.com/pyreadline/pyreadline/pull/48\n.. _`this fork`: https://github.com/antocuni/pyreadline\n\nIf you are using **Python 3**, ``pyrepl`` does not work, and thus is not\ninstalled. Your only option to get colors is to use a patched ``readline``, as\nexplained below.\n\nI really want to use readline\n------------------------------\n\nThis method is not really recommended, but if you really want, you can use use\na patched readline: you can find the patches in the ``misc/`` directory:\n\n * for `readline-5.2`_\n\n * for `readline-6.0`_\n\nYou can also try one of the following precompiled versions, which has been\ntested on Ubuntu 10.10: remember to put them in a place where the linker can\nfind them, e.g. by setting ``LD_LIBRARY_PATH``:\n\n * readline-6.0 for `32-bit`_\n\n * readline-6.0 for `64-bit`_\n\nOnce it is installed, you should double-check that you can find it, e.g. by\nrunning ``ldd`` on Python's ``readline.so`` module::\n\n $ ldd /usr/lib/python2.6/lib-dynload/readline.so | grep readline\n libreadline.so.6 => /home/antocuni/local/32/lib/libreadline.so.6 (0x00ee7000)\n\nFinally, you need to force ``fancycompleter`` to use colors, since by default,\nit uses colors only with ``pyrepl``: you can do it by placing a custom config\nfile in ``~/.fancycompleterrc.py``. An example config file is `here`_ (remind\nthat you need to put a dot in front of the filename!).\n\n.. _`readline-5.2`: http://bitbucket.org/antocuni/fancycompleter/src/tip/misc/readline-escape-5.2.patch\n.. _`readline-6.0`: http://bitbucket.org/antocuni/fancycompleter/src/tip/misc/readline-escape-6.0.patch\n.. _`32-bit`: http://bitbucket.org/antocuni/fancycompleter/src/tip/misc/libreadline.so.6-32bit\n.. _`64-bit`: http://bitbucket.org/antocuni/fancycompleter/src/tip/misc/libreadline.so.6-64bit\n.. _here: http://bitbucket.org/antocuni/fancycompleter/src/tip/misc/fancycompleterrc.py\n\n\nCustomization\n--------------\n\nTo customize the configuration of fancycompleter, you need to put a\nfile named ``.fancycompleterrc.py`` in your home directory. The file must\ncontain a class named ``Config`` inheriting from ``DefaultConfig`` and\noverridding the desired values.\n\n\nWhat is really going on?\n-------------------------\n\nThe default and preferred way to get colors is to use ``pyrepl``. However,\nthere is no way to tell CPython to use ``pyrepl`` instead of the built-in\nreadline at the interactive prompt: this means that even if we install our\ncompleter inside pyrepl's readline library, the interactive prompt won't see\nit.\n\nThe issue is simply solved by avoiding to use the built-in prompt: instead, we\nuse a pure Python replacement based on `code.InteractiveConsole`_. This\nbrings us also some niceties, such as the ability to do multi-line editing of\nthe history.\n\nThe console is automatically run by ``fancycompleter.interact()``, followed by\n``sys.exit()``: this way, if we execute it from the script in\n``PYTHONSTARTUP``, the interpreter exits as soon as we finish the use the\nprompt (e.g. by pressing CTRL-D, or by calling ``quit()``). This way, we\navoid to enter the built-in prompt and we get a behaviour which closely\nresembles the default one. This is why in this configuration lines after\n``fancycompleter.interact()`` might not be run.\n\nNote that if we are using ``readline`` instead of ``pyrepl``, the trick is not\nneeded and thus ``interact()`` will simply returns, letting the built-in\nprompt to show up. The same is true if we are running PyPy, as its built-in\nprompt is based on pyrepl anyway.\n\n\n.. _rlcompleter: http://docs.python.org/library/rlcompleter.html\n.. _PYTHONSTARTUP: http://docs.python.org/using/cmdline.html#envvar-PYTHONSTARTUP\n.. _`GNU readline`: http://tiswww.case.edu/php/chet/readline/rltop.html\n.. _pyrepl: http://codespeak.net/pyrepl/\n.. _`SVN repository`: http://codespeak.net/svn/pyrepl/trunk/pyrepl/\n.. _`code.InteractiveConsole`: http://docs.python.org/library/code.html#code.InteractiveConsole\n.. _pyreadline: https://pypi.python.org/pypi/pyreadline\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/antocuni/fancycompleter", "keywords": "rlcompleter prompt tab color completion", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "fancycompleter", "package_url": "https://pypi.org/project/fancycompleter/", "platform": "", "project_url": "https://pypi.org/project/fancycompleter/", "project_urls": { "Homepage": "http://bitbucket.org/antocuni/fancycompleter" }, "release_url": "https://pypi.org/project/fancycompleter/0.8/", "requires_dist": null, "requires_python": "", "summary": "colorful TAB completion for Python prompt", "version": "0.8" }, "last_serial": 5326715, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "79914572b154df0d606b5a4632d3334f", "sha256": "4a56ba89d632f7e15a90d8f004e6be8f15f7ace7b5b031e84d5413c111e2b41c" }, "downloads": -1, "filename": "fancycompleter-0.1.tar.gz", "has_sig": false, "md5_digest": "79914572b154df0d606b5a4632d3334f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7642, "upload_time": "2010-11-16T00:46:05", "url": "https://files.pythonhosted.org/packages/89/95/de1fdd7f7aeabfdf5fb1d6d70109b9c1ca03495fb3ca538c6bb302412a0f/fancycompleter-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "10675269807dea8300a42240c6586965", "sha256": "b0e4257e74f96ce2f3dfadd6b6f9e53862d1abed3561d8721a3c8069b5fd19e6" }, "downloads": -1, "filename": "fancycompleter-0.2.tar.gz", "has_sig": false, "md5_digest": "10675269807dea8300a42240c6586965", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8030, "upload_time": "2010-11-22T22:57:41", "url": "https://files.pythonhosted.org/packages/80/ce/c4df914fb9cbe8767bf2d0c612cf77c0110e36e1a824fc43310625df3217/fancycompleter-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "10078d2e01084529865bd5281b5e6845", "sha256": "de0a0b1866672a9aa7b6825610a92475fd8531f20579bdcf015c38d31ebb2479" }, "downloads": -1, "filename": "fancycompleter-0.3.tar.gz", "has_sig": false, "md5_digest": "10078d2e01084529865bd5281b5e6845", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8414, "upload_time": "2012-02-16T21:36:40", "url": "https://files.pythonhosted.org/packages/90/69/5692ebcfa9ab4c553f1305ae98834db8f1c7b50ad69ce4c58b6d7c372e6b/fancycompleter-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "44667c62c6db6318ca6482f3e0781d31", "sha256": "13e25da511c011cb48c8c59fd408774f0329b36d01ba7da8add486ae05b278d7" }, "downloads": -1, "filename": "fancycompleter-0.4.tar.gz", "has_sig": false, "md5_digest": "44667c62c6db6318ca6482f3e0781d31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8435, "upload_time": "2012-03-16T15:50:59", "url": "https://files.pythonhosted.org/packages/4f/80/c1ffb3484f344fe52cc674dae6aaeea1c5f729b548dd5b07d4a80fcfa6ea/fancycompleter-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "5eacad3b56b3b6a8435af44df7899e65", "sha256": "1e4b811dba3af37697719974cb2e9d0cc58ec828c867be3b6aea2db412bb55c0" }, "downloads": -1, "filename": "fancycompleter-0.5.tar.gz", "has_sig": false, "md5_digest": "5eacad3b56b3b6a8435af44df7899e65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8569, "upload_time": "2016-04-29T15:57:18", "url": "https://files.pythonhosted.org/packages/2d/4c/753646af3c4eafc6a4e4a0886f1becd09ddb3bb179bd3c350d8ac357b29a/fancycompleter-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "9c4a2c4b1931f182f41ddf35ea100bf9", "sha256": "25626b06c938e69a990d006e3bc9acfbc3dc1b3f3548a6d25b22f0c46ecb8bed" }, "downloads": -1, "filename": "fancycompleter-0.6.tar.gz", "has_sig": false, "md5_digest": "9c4a2c4b1931f182f41ddf35ea100bf9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 512717, "upload_time": "2016-11-25T17:20:16", "url": "https://files.pythonhosted.org/packages/b8/d0/bcdf0915b527e70678274722a4be9a1cf50019ca0859f477f195d3658108/fancycompleter-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "c5f01df94253039d8067451e03d6ebfa", "sha256": "9bc54343ca238715015ed35e7b4527edb51a9d2773c0f800def435a39d835708" }, "downloads": -1, "filename": "fancycompleter-0.6.1.tar.gz", "has_sig": false, "md5_digest": "c5f01df94253039d8067451e03d6ebfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 512775, "upload_time": "2016-11-25T17:35:35", "url": "https://files.pythonhosted.org/packages/3c/69/47d933902f50658de6cdfbd2c55adfdcebea10682f45eba143b53a4ce2eb/fancycompleter-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "b892e4e21a2cb8f5f2bff26be5a5b17b", "sha256": "fd091a7e7b13cb330cdabe7bf4ffe95a0f8b48b2fa8fa08a4b940982a729039b" }, "downloads": -1, "filename": "fancycompleter-0.6.2.tar.gz", "has_sig": false, "md5_digest": "b892e4e21a2cb8f5f2bff26be5a5b17b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 512749, "upload_time": "2016-11-26T10:37:34", "url": "https://files.pythonhosted.org/packages/ce/5b/275f85f8ca2769d8b485927048c25d679e140f03e38305692dd789f0a260/fancycompleter-0.6.2.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "1a888cb86cbcfa41dcf73b50582cd5ec", "sha256": "7b1b0e51389ccf2b8799f1f90bafa177e3f8baa72a8eb11f5ce17ec1d348a089" }, "downloads": -1, "filename": "fancycompleter-0.6.3.tar.gz", "has_sig": false, "md5_digest": "1a888cb86cbcfa41dcf73b50582cd5ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 514280, "upload_time": "2016-11-30T00:31:17", "url": "https://files.pythonhosted.org/packages/00/b2/1df669e1b76906387831b979a693dea5576a0e282188755744443ea7c465/fancycompleter-0.6.3.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "fc140f78fa6afe923698cf469df42abd", "sha256": "5044bf91766dde3addfea81aaf36bacce89e1a872a10567f57e51f981c531eb7" }, "downloads": -1, "filename": "fancycompleter-0.7.tar.gz", "has_sig": false, "md5_digest": "fc140f78fa6afe923698cf469df42abd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 514584, "upload_time": "2016-11-30T15:03:50", "url": "https://files.pythonhosted.org/packages/93/33/0fc5fd5ffcd05e60af4f923d0d722e280a3ea348c00f25d0081c794e075c/fancycompleter-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "50d29d8b1671f4bfb76dd3d3fa5e6fea", "sha256": "d2522f1f3512371f295379c4c0d1962de06762eb586c199620a2a5d423539b12" }, "downloads": -1, "filename": "fancycompleter-0.8.tar.gz", "has_sig": false, "md5_digest": "50d29d8b1671f4bfb76dd3d3fa5e6fea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 514982, "upload_time": "2017-10-26T06:12:24", "url": "https://files.pythonhosted.org/packages/fd/e3/da39a6cfaffe578a01221261ac1d5d99c48d44f6377ff0de3a12dd332cec/fancycompleter-0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "50d29d8b1671f4bfb76dd3d3fa5e6fea", "sha256": "d2522f1f3512371f295379c4c0d1962de06762eb586c199620a2a5d423539b12" }, "downloads": -1, "filename": "fancycompleter-0.8.tar.gz", "has_sig": false, "md5_digest": "50d29d8b1671f4bfb76dd3d3fa5e6fea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 514982, "upload_time": "2017-10-26T06:12:24", "url": "https://files.pythonhosted.org/packages/fd/e3/da39a6cfaffe578a01221261ac1d5d99c48d44f6377ff0de3a12dd332cec/fancycompleter-0.8.tar.gz" } ] }