{ "info": { "author": "Malthe Borch", "author_email": "mborch@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI" ], "description": "Overview\n========\n\nThis package provides a module-level source-code generator which\noperates on the AST from the built-in ``compiler.ast`` module.\n\nNote that this AST is not compatible with the new ``ast`` module in\nPython 2.6.\n\nUsage\n-----\n\nThe generator works on AST parse trees.\n\n >>> from compiler import parse\n >>> tree = parse(\"\"\"\\\n ... print 'Hello, world!'\n ... \"\"\")\n\nWe can now generate Python-code equivalent to the original using the\nsource-code generator.\n \n >>> from sourcecodegen import ModuleSourceCodeGenerator\n >>> generator = ModuleSourceCodeGenerator(tree)\n >>> print generator.getSourceCode()\n print 'Hello, world!'\n\nAuthor\n------\n\nMalthe Borch \n\n\nChangelog\n=========\n\n0.6.14 (released 19/05/2011)\n\n- Fixed issue where an ``ast.Sliceobj`` outside the context of\n subscripts (this is an odd construct which is unfortunately\n understood by Python's legacy AST compiler, but not possible to\n reproduce from source code).\n\n The issue affects at least Zope's ``RestrictedPython`` package.\n [malthe]\n\n- Fixed issue where a function with a docstring and a function body\n would get incorrect indentation.\n [malthe]\n\n0.6.13 (released 28/02/2011)\n\n- Added support for function docstrings.\n [malthe]\n\n0.6.12 (released 12/01/2010)\n\n- Add repoze license text in LICENSE.txt with permission of author.\n http://lists.repoze.org/pipermail/repoze-dev/2010-January/002554.html\n [jinty]\n\n0.6.11 (released 15/07/2009)\n\n- Added support for ternary operator (Python 2.5+). [malthe]\n\n0.6.10 (released 6/07/2009)\n\n- Fixed order of node and expression for augmented assignment. [malthe]\n\n0.6.9 (released 19/05/2009)\n\n- Fixed issue where variable keyword-arguments would sometimes not be\n handled correctly. [malthe]\n\n- Fixed issue where identity operator would not be handled\n correctly. [malthe]\n\n0.6.8 (released 18/05/2009)\n\n - Fixed issue where the delete operator would not be treated as a\n statement. [malthe]\n\n0.6.7 (released 22/04/2009)\n\n - Fixed issue where star and double-star arguments would be printed\n without the '*' and '**' prefix. [malthe]\n\n0.6.6 (released 17/04/2009)\n\n - Fixed issue where multiple discarded elements in a statement would\n get wrong indentation. [malthe]\n\n0.6.5 (released 19/02/2009)\n\n - Fixed issue where a module docstring would cause an undesired\n indentaion. [malthe]\n\n0.6.4 (released 24/01/2009)\n\n - Added convenience method to generate code. [malthe]\n\n0.6.3 (released 18/12/2008)\n\n - Allow proper operation under Python 2.4 (try/finally\n fixes). [chrism]\n\n0.6.2 (released 14/12/2008)\n\n - Fixed issue where lambda blocks would be incorrectly indented;\n also, function bodies are now always properly cleared. [malthe]\n\n0.6.1 (released 13/12/2008)\n\n - Fixed issue where generators would not be prioritized in certain\n cases. [malthe]\n\n0.6 (released 13/12/2008)\n\n - Operator precedence is now taken into account such that we can\n avoid unnecessary use of parentheses. This is done not only for\n aesthetic reasons, but more importantly to avoid running into\n parser errors due to Python's nesting limitation. [malthe]\n\n0.5 (released 28/11/2008)\n\n - Added `yield` and unary operators. [malthe]\n\n0.4 (released 28/11/2008)\n\n - Make sure all binary operators get parentheses around them; we may\n be able to improve upon this in the future (for\n legibility-reasons). [malthe]\n\n0.3 (released 27/11/2008)\n\n - Added logical operators. [malthe]\n\n - Fixed tuple unpacking issues. [malthe]\n\n - Added for-loop. [malthe]\n\n0.2 (released 27/11/2008)\n\n - Fixed issue with tuples and parentheses. [malthe]\n\n - Fixed issue with multiple assignments. [malthe]\n\n - Added support for `not` operator. [malthe]\n\n - Fixed issue where default arguments would be written incorrectly if\n no non-keyword arguments were present. [malthe]\n\n - Fixed issue where statements would not be cleared properly. [malthe]\n\n - Assignments are statements and should terminate. [malthe]\n\n0.1 (released 26/11/2008)\n\n - Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "python source-code generation ast", "license": "BSD-like (http://repoze.org/license.html)", "maintainer": null, "maintainer_email": null, "name": "sourcecodegen", "package_url": "https://pypi.org/project/sourcecodegen/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sourcecodegen/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/sourcecodegen/0.6.14/", "requires_dist": null, "requires_python": null, "summary": "A Python source-code generator based on the ``compiler.ast`` abstract syntax tree.", "version": "0.6.14" }, "last_serial": 799848, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a3d43e1f109963f111a232620b35139d", "sha256": "36895e443c720642264c905147688a3da844f6714c63991a17b8253e425795d0" }, "downloads": -1, "filename": "sourcecodegen-0.1.tar.gz", "has_sig": false, "md5_digest": "a3d43e1f109963f111a232620b35139d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9286, "upload_time": "2008-11-26T22:24:02", "url": "https://files.pythonhosted.org/packages/f5/85/57a2ab56db0b120c431d3859fac2b71f246e2da58b7a23f8af965049ed13/sourcecodegen-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "da9e6a5d56a9fe38e8fa47a95f35c20a", "sha256": "c5df8680f7251772ffb4e2faa4f1bc6c93605ad1b7e8000c547f173f9f05b175" }, "downloads": -1, "filename": "sourcecodegen-0.2.tar.gz", "has_sig": false, "md5_digest": "da9e6a5d56a9fe38e8fa47a95f35c20a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9857, "upload_time": "2008-11-27T00:55:29", "url": "https://files.pythonhosted.org/packages/7d/99/a782375bb078ed92eb0a4199f717aad480e7c67529efde02e58ffd1cdb59/sourcecodegen-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "1f27c3fb22effa2b73af821d7f997bba", "sha256": "0db7df60924a1628c5efef14c3eed7a2b06053162d812e370e881d3e0863c869" }, "downloads": -1, "filename": "sourcecodegen-0.3.tar.gz", "has_sig": false, "md5_digest": "1f27c3fb22effa2b73af821d7f997bba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10264, "upload_time": "2008-11-27T01:55:45", "url": "https://files.pythonhosted.org/packages/64/bd/36a875914d76f7c01c05e2d067936021e5ce668af32a3befdd81b64f4e84/sourcecodegen-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "2db0aafa509d3f4591792acbdc5c2525", "sha256": "4f33036fadce541d8a74434305c7be452394ed502f4be1e8c6c30bd3bcd3761b" }, "downloads": -1, "filename": "sourcecodegen-0.4.tar.gz", "has_sig": false, "md5_digest": "2db0aafa509d3f4591792acbdc5c2525", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9984, "upload_time": "2008-11-27T11:22:42", "url": "https://files.pythonhosted.org/packages/a9/c1/62acaa2cd85e62fc16ead1953234a6d281e2bc87826dfaa99e00d5c6babc/sourcecodegen-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "f9dee29fd242a185db64fa1a27586331", "sha256": "a92039ef7a5a7282c11f4209b2d71d976c5c9c3133ca02f9119db711b7724e0d" }, "downloads": -1, "filename": "sourcecodegen-0.5.tar.gz", "has_sig": false, "md5_digest": "f9dee29fd242a185db64fa1a27586331", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10535, "upload_time": "2008-11-28T19:38:27", "url": "https://files.pythonhosted.org/packages/90/0e/0bee1b7be4a2c8d1133865d831acba4d345580916adbc5669239c621a5cc/sourcecodegen-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "0a732a41ce9ad999eadbda7c94389bfa", "sha256": "d91c6492810abf7d9daa865fffa0ef4696f1d0f4d724fba308d4c6d0bf2b94b9" }, "downloads": -1, "filename": "sourcecodegen-0.6.tar.gz", "has_sig": false, "md5_digest": "0a732a41ce9ad999eadbda7c94389bfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11167, "upload_time": "2008-12-13T14:58:10", "url": "https://files.pythonhosted.org/packages/8f/bf/aa30841b27ce163c51f95fa40f7af4e4e551e5f7d34695911e352eac48ab/sourcecodegen-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "d9ab15e71f1e2d5bf4e788b93d83538a", "sha256": "394ef4f6ab5c8caebc0f9eab8dd6e2ba316832438afc19ced66e4b3b1a3a4a2f" }, "downloads": -1, "filename": "sourcecodegen-0.6.1.tar.gz", "has_sig": false, "md5_digest": "d9ab15e71f1e2d5bf4e788b93d83538a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11269, "upload_time": "2008-12-13T19:26:35", "url": "https://files.pythonhosted.org/packages/48/0c/fad533542447571622b7e0e82193751c6d1a2cd9b4d48264d569ef03e2a6/sourcecodegen-0.6.1.tar.gz" } ], "0.6.10": [ { "comment_text": "", "digests": { "md5": "8398e7bf3c6587f207b8b4932eb25046", "sha256": "82ff43b3176c604763b4879b39d161e2458b5260c01e7c42d3e957db1f2b3189" }, "downloads": -1, "filename": "sourcecodegen-0.6.10.tar.gz", "has_sig": false, "md5_digest": "8398e7bf3c6587f207b8b4932eb25046", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12784, "upload_time": "2009-07-07T09:58:32", "url": "https://files.pythonhosted.org/packages/bb/de/31ff816b175cfb16d0427e592d22a1965ae8616837ac50f13e44b885942f/sourcecodegen-0.6.10.tar.gz" } ], "0.6.11": [ { "comment_text": "", "digests": { "md5": "5bc9ea1f9a48e14968ab7bfb023be37e", "sha256": "a96b5294fe3c8e01b9cdd8c610238f040e9120428357a33b90e42c49af61fea8" }, "downloads": -1, "filename": "sourcecodegen-0.6.11.tar.gz", "has_sig": false, "md5_digest": "5bc9ea1f9a48e14968ab7bfb023be37e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12885, "upload_time": "2009-07-15T09:42:22", "url": "https://files.pythonhosted.org/packages/4f/47/54db96b314dd49f516add8d4e1eab6c0b8825e59b6d6da7839190d43d2af/sourcecodegen-0.6.11.tar.gz" } ], "0.6.12": [ { "comment_text": "", "digests": { "md5": "8662afe29393ad74d1f2a1ca3be2bf6d", "sha256": "5601e0d26b54053957fe121ab49208f5fdd7afe0016fd72b98d179e4b6a34113" }, "downloads": -1, "filename": "sourcecodegen-0.6.12.tar.gz", "has_sig": false, "md5_digest": "8662afe29393ad74d1f2a1ca3be2bf6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14142, "upload_time": "2010-01-12T15:52:35", "url": "https://files.pythonhosted.org/packages/28/5a/525af01fd853eae1191fefe128936555c453ebf7cd12bbc3613980d72224/sourcecodegen-0.6.12.tar.gz" } ], "0.6.13": [ { "comment_text": "", "digests": { "md5": "867c43ecd51345296b7d495583dee8e7", "sha256": "f894a3de907d9e145e1df5f719d0de1c59fe53536d1f7f1fa3f460a6fe6442f5" }, "downloads": -1, "filename": "sourcecodegen-0.6.13.tar.gz", "has_sig": false, "md5_digest": "867c43ecd51345296b7d495583dee8e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13227, "upload_time": "2011-02-28T10:22:24", "url": "https://files.pythonhosted.org/packages/72/d7/1fa7e5a90ebff95ec9a09398f610cce0fb22e58677bbef46a0caf6dc3640/sourcecodegen-0.6.13.tar.gz" } ], "0.6.14": [ { "comment_text": "", "digests": { "md5": "cb3f3fd1066e9b419f6b55a7d0a29dfd", "sha256": "f71971ed2d1bb188f4ca17e123bd34dca6314287726d19fc1ae5f2f0c0c6c5c3" }, "downloads": -1, "filename": "sourcecodegen-0.6.14.tar.gz", "has_sig": false, "md5_digest": "cb3f3fd1066e9b419f6b55a7d0a29dfd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13581, "upload_time": "2011-05-19T11:05:19", "url": "https://files.pythonhosted.org/packages/49/8f/2c3657f3b7dc1377510dfb7b286998c4a78ec25d84073a81c4d97b49b7e7/sourcecodegen-0.6.14.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "cb6aafe946d7a8e266dcddadbf35304a", "sha256": "8092631297defcff57e9c1ff5f4dca6ea8d158d698d84197511ae4eb5f9eb748" }, "downloads": -1, "filename": "sourcecodegen-0.6.2.tar.gz", "has_sig": false, "md5_digest": "cb6aafe946d7a8e266dcddadbf35304a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11419, "upload_time": "2008-12-14T17:49:02", "url": "https://files.pythonhosted.org/packages/6d/b0/3faf297d482838c72f84f483182e87d306787ce2cd06e1ce9a2c1f9c9ff9/sourcecodegen-0.6.2.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "6a0d0c105a10a25f694a16e0d95f9da9", "sha256": "f010d367adb2f46134f54cbfd5d417ce31e56a0672d17bfdcdf18ef38426eeee" }, "downloads": -1, "filename": "sourcecodegen-0.6.3.tar.gz", "has_sig": false, "md5_digest": "6a0d0c105a10a25f694a16e0d95f9da9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11802, "upload_time": "2008-12-18T15:57:50", "url": "https://files.pythonhosted.org/packages/3a/7b/c297634f448e4cbb6a0e3eac01285a835d7b5d93d264e8e9bb75aa4f3d0d/sourcecodegen-0.6.3.tar.gz" } ], "0.6.4": [ { "comment_text": "", "digests": { "md5": "b2a3169678211482ec504102e0035c06", "sha256": "2aca6d225a2eba56d01558bc56ff55c7dd5f03cef0a00602e0eda6ca4229e168" }, "downloads": -1, "filename": "sourcecodegen-0.6.4.tar.gz", "has_sig": false, "md5_digest": "b2a3169678211482ec504102e0035c06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11917, "upload_time": "2009-01-22T09:22:38", "url": "https://files.pythonhosted.org/packages/a7/52/345ca347e10c6e2d7d2b3768f9a63fe997cca53693ff45cd53a2e6a7ad61/sourcecodegen-0.6.4.tar.gz" } ], "0.6.5": [ { "comment_text": "", "digests": { "md5": "6c8cbe521952a3809dd8c5ebbe241f0d", "sha256": "3d717a1adf107fd2f4eb2398ae5f2119a5da17253f7f92e8e19a6f733118ad80" }, "downloads": -1, "filename": "sourcecodegen-0.6.5.tar.gz", "has_sig": false, "md5_digest": "6c8cbe521952a3809dd8c5ebbe241f0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12049, "upload_time": "2009-02-19T18:13:37", "url": "https://files.pythonhosted.org/packages/d8/62/d7744b02016374d0d168aeccca25568060be0623648e24f2ab69d49df4b2/sourcecodegen-0.6.5.tar.gz" } ], "0.6.6": [ { "comment_text": "", "digests": { "md5": "8b0bd25a341ec5d03bc59c83cbf4d6b5", "sha256": "90d313f4358d3e7f9892712713318d3a623063104958b13238f5af1b68021c3e" }, "downloads": -1, "filename": "sourcecodegen-0.6.6.tar.gz", "has_sig": false, "md5_digest": "8b0bd25a341ec5d03bc59c83cbf4d6b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12176, "upload_time": "2009-04-17T08:53:56", "url": "https://files.pythonhosted.org/packages/e9/d9/410caf16a41461a54e8f02c7fad899ef3e63471d0100f0c5305213169ae4/sourcecodegen-0.6.6.tar.gz" } ], "0.6.7": [ { "comment_text": "", "digests": { "md5": "235cc329f6b6b504e6afc43932df77ac", "sha256": "ab61a80f08f754eba7f81b4c7e703e8678c83f0cdd049590b434fbd6b2e42788" }, "downloads": -1, "filename": "sourcecodegen-0.6.7.tar.gz", "has_sig": false, "md5_digest": "235cc329f6b6b504e6afc43932df77ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12395, "upload_time": "2009-04-22T09:50:08", "url": "https://files.pythonhosted.org/packages/ca/aa/ff071e840fa2608fb8f8b157f6b8187b1becb0d9b5beff6af3110eedd8f9/sourcecodegen-0.6.7.tar.gz" } ], "0.6.8": [ { "comment_text": "", "digests": { "md5": "209a97281cc0180064cc4b10a86669cf", "sha256": "749bc9aa331a95aa681e35a938d579847eb8a68d5b66505d226ece468b8ed7ac" }, "downloads": -1, "filename": "sourcecodegen-0.6.8.tar.gz", "has_sig": false, "md5_digest": "209a97281cc0180064cc4b10a86669cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12518, "upload_time": "2009-05-18T12:40:45", "url": "https://files.pythonhosted.org/packages/ec/86/be8751855f8bdcc10c7e7a003453afea3a2598c7e95c2e3d728c99a888b9/sourcecodegen-0.6.8.tar.gz" } ], "0.6.9": [ { "comment_text": "", "digests": { "md5": "bf143692b9bf1e63c58a3e2021913b7e", "sha256": "2ca17d384a8c517ea2a31b5a9a66e7f744c6c047afb1a9cfe40559a1904d801c" }, "downloads": -1, "filename": "sourcecodegen-0.6.9.tar.gz", "has_sig": false, "md5_digest": "bf143692b9bf1e63c58a3e2021913b7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12652, "upload_time": "2009-05-19T16:50:20", "url": "https://files.pythonhosted.org/packages/9a/88/7592c7d5afa2e6f15020cfd95349eb212cd472823215ff025fb8182ba90b/sourcecodegen-0.6.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cb3f3fd1066e9b419f6b55a7d0a29dfd", "sha256": "f71971ed2d1bb188f4ca17e123bd34dca6314287726d19fc1ae5f2f0c0c6c5c3" }, "downloads": -1, "filename": "sourcecodegen-0.6.14.tar.gz", "has_sig": false, "md5_digest": "cb3f3fd1066e9b419f6b55a7d0a29dfd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13581, "upload_time": "2011-05-19T11:05:19", "url": "https://files.pythonhosted.org/packages/49/8f/2c3657f3b7dc1377510dfb7b286998c4a78ec25d84073a81c4d97b49b7e7/sourcecodegen-0.6.14.tar.gz" } ] }