untokenize


Nameuntokenize JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/myint/untokenize
SummaryTransforms tokens into original source code (while preserving whitespace).
upload_time2014-02-08 16:30:40
maintainerNone
docs_urlNone
authorSteven Myint
requires_pythonNone
licenseExpat License
keywords tokenize untokenize transform generate
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ============
untokenize
============

*untokenize* transforms tokens into source code. Unlike the standard library's
``tokenize.untokenize()``, it preserves the original whitespace between tokens.

.. image:: https://travis-ci.org/myint/untokenize.png?branch=master
    :target: https://travis-ci.org/myint/untokenize
    :alt: Build status


Usage
=====

.. code-block:: python

    import untokenize
    source_code = untokenize.untokenize(tokens)


Tests
=====

To run the unit tests::

    $ ./test_untokenize.py

There is also an acid test. It tokenizes Python code and confirms that the code
generated by untokenize exactly matches the original source code from before
tokenization::

    $ ./test_acid.py
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/myint/untokenize",
    "name": "untokenize",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "tokenize,untokenize,transform,generate",
    "author": "Steven Myint",
    "author_email": "UNKNOWN",
    "download_url": "https://files.pythonhosted.org/packages/f7/46/e7cea8159199096e1df52da20a57a6665da80c37fb8aeb848a3e47442c32/untokenize-0.1.1.tar.gz",
    "platform": "UNKNOWN",
    "description": "============\nuntokenize\n============\n\n*untokenize* transforms tokens into source code. Unlike the standard library's\n``tokenize.untokenize()``, it preserves the original whitespace between tokens.\n\n.. image:: https://travis-ci.org/myint/untokenize.png?branch=master\n    :target: https://travis-ci.org/myint/untokenize\n    :alt: Build status\n\n\nUsage\n=====\n\n.. code-block:: python\n\n    import untokenize\n    source_code = untokenize.untokenize(tokens)\n\n\nTests\n=====\n\nTo run the unit tests::\n\n    $ ./test_untokenize.py\n\nThere is also an acid test. It tokenizes Python code and confirms that the code\ngenerated by untokenize exactly matches the original source code from before\ntokenization::\n\n    $ ./test_acid.py",
    "bugtrack_url": null,
    "license": "Expat License",
    "summary": "Transforms tokens into original source code (while preserving whitespace).",
    "version": "0.1.1",
    "project_urls": {
        "Download": "UNKNOWN",
        "Homepage": "https://github.com/myint/untokenize"
    },
    "split_keywords": [
        "tokenize",
        "untokenize",
        "transform",
        "generate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f746e7cea8159199096e1df52da20a57a6665da80c37fb8aeb848a3e47442c32",
                "md5": "50d325dff09208c624cc603fad33bb0d",
                "sha256": "3865dbbbb8efb4bb5eaa72f1be7f3e0be00ea8b7f125c69cbd1f5fda926f37a2"
            },
            "downloads": -1,
            "filename": "untokenize-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "50d325dff09208c624cc603fad33bb0d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3099,
            "upload_time": "2014-02-08T16:30:40",
            "upload_time_iso_8601": "2014-02-08T16:30:40.631383Z",
            "url": "https://files.pythonhosted.org/packages/f7/46/e7cea8159199096e1df52da20a57a6665da80c37fb8aeb848a3e47442c32/untokenize-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2014-02-08 16:30:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "myint",
    "github_project": "untokenize",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "untokenize"
}
        
Elapsed time: 0.23586s