{ "info": { "author": "Stephan Wenger", "author_email": "wenger@cg.cs.tu-bs.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Topic :: Documentation", "Topic :: Software Development :: Documentation", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Filters", "Topic :: Text Processing :: Markup :: HTML" ], "description": "`mylit` is a simple tool for literate programming in Python.\n\nLiterate Python programs are just regular Python source files with extensive\ncomments. When `mylit` is run with a literate Python program as input, it\ncreates an HTML file containing the comments and highlighted source code. You\ncan use HTML markup in comments as you may see fit.\n\nIn addition to simple comments, the HTML compilation process can be customized\nby starting a comment line with `##`. Anything that follows on such a line will\nbe executed in the parser's context. The code can, for example, set variables,\nmanipulate the generated HTML, or generate debug output. Look at the `mylit`\nsource code to see what it can do.\n\nLines starting with `#!` are ignored completely. This way, you can comment out\nthings that are not meant to be included in the final HTML file.\n\nHere's a simple example of what a literate program might look like::\n\n #!/usr/bin/env python\n #! This line is ignored, as is the previous line.\n\n #! Set the title variable of the parser:\n ## title = \"mylit example\"\n\n #

A simple mylit example

\n # This is a simple example of literate Python programming with mylit.\n\n # Here we define a function that checks whether a given pair of coordinates\n # lies within a circle of radius r.\n def in_circle(x, y, r):\n # We first square both x and y, and sum them up.\n s = x ** 2 + y ** 2\n\n #

Note how the above comment contains HTML markup. The indentation of\n # the highlighted Python code is unaffected by interspersed comments.

\n\n # Here we check whether the coordinates (x, y)\n # lie within a circle of radius r.\n if s < r ** 2:\n # Everything's okay, so we can return True:\n return True\n else:\n # We may have a problem here. Better print a warning.\n import warnings\n warnings.warn(\"Danger, Will Robinson!\")\n return False\n\n # When this program is run from the command line, it performs a simple test.\n if __name__ == \"__main__\":\n assert in_circle(3, 4, 5.1) == True\n assert in_circle(3, 4, 4.9) == False\n\nOf course, `mylit` itself is a literate Python program.", "description_content_type": null, "docs_url": "https://pythonhosted.org/mylit/", "download_url": "http://pypi.python.org/pypi/mylit", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://packages.python.org/mylit", "keywords": "literate programming", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "mylit", "package_url": "https://pypi.org/project/mylit/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mylit/", "project_urls": { "Download": "http://pypi.python.org/pypi/mylit", "Homepage": "http://packages.python.org/mylit" }, "release_url": "https://pypi.org/project/mylit/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Literate programming for Python", "version": "0.1.2" }, "last_serial": 733008, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4883ddd3d40a15b452909d488e2a8881", "sha256": "c2aeda1fb1c57c7234068e1337b4a801387326e6dbd05e8708364b2f25678d6a" }, "downloads": -1, "filename": "mylit-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4883ddd3d40a15b452909d488e2a8881", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5130, "upload_time": "2012-03-14T13:15:22", "url": "https://files.pythonhosted.org/packages/8b/2d/d6f4622f7d51e86dcc800ea1ba1628c6cc8ad2be1151d92aef4f6e8c6536/mylit-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a6ae27ce4b11ffbd6a6df2088bbbae54", "sha256": "ff93c03c10fb4d849b9c2032417f4449026dae5b0e1f700052ad160e07a36d99" }, "downloads": -1, "filename": "mylit-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a6ae27ce4b11ffbd6a6df2088bbbae54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5784, "upload_time": "2012-03-14T15:28:59", "url": "https://files.pythonhosted.org/packages/ec/91/657ffadd4804631c8f5ad0e85cac34899729d14eb0711242c694a60631ff/mylit-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6a44bc6c9c55ea25b24c56963b03228e", "sha256": "a25ae26ae002e856ee0bdadaf3e4af385c73354cb57b22cb3175e642dfc79bd3" }, "downloads": -1, "filename": "mylit-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6a44bc6c9c55ea25b24c56963b03228e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5839, "upload_time": "2012-03-14T16:37:19", "url": "https://files.pythonhosted.org/packages/dd/43/e2a2cbef8801e403eabdcc19c03cce9ebc7947807c7f7562923332e15525/mylit-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6a44bc6c9c55ea25b24c56963b03228e", "sha256": "a25ae26ae002e856ee0bdadaf3e4af385c73354cb57b22cb3175e642dfc79bd3" }, "downloads": -1, "filename": "mylit-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6a44bc6c9c55ea25b24c56963b03228e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5839, "upload_time": "2012-03-14T16:37:19", "url": "https://files.pythonhosted.org/packages/dd/43/e2a2cbef8801e403eabdcc19c03cce9ebc7947807c7f7562923332e15525/mylit-0.1.2.tar.gz" } ] }