{ "info": { "author": "JP Senior, Pavel Kirienko", "author_email": "pavel.kirienko@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Sphinx :: Extension", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], "description": "sphinx-computron\n================\n\nSphinx-computron is an extension for Sphinx that allows a document author\nto insert arbitrary python code samples in code blocks, or run python code\nfrom python files on the filesystem. The output is interpreted as ReST,\nas if the output of the executed code was copy-pasted in-place into the\ndocument.\n\nThis was written as an alternative to other code execution functions which\nrelied on doctest formats, and attempts to be more flexible, similar to\nliteral-block and code-block statements.\n\nThe original author is `JP Senior `_.\nHis version of the package appears to be unmantained so I decided to salvage\nit by making a hard fork. The name had to be changed to avoid collisions\nwith his version published on PyPI.\n\nOptions\n-------\nOptions are:\n\nfilename\n If specified, will load code from a file (relative to sphinx doc root)\n and prepend that to the directive's content before its execution.\n\ncomputron-injection\n--------------------\n\nExecuting python code and parsing output as ReST::\n\n .. computron-injection::\n\n print('*This is interpreted as ReST!*')\n\n\nWhatever is written into stdout is collected and the injected in-place into\nthe document. Stderr is not captured.\n\nExecuting python code from a file\n---------------------------------\ncomputron-injection also allows you to import a python file and execute\nit within a document.\nThe path is specified relative to the source ReST file where the\ndirective is encountered.\n\nRunning a Python file in the same directory::\n\n .. computron-injection::\n :filename: my_class.py\n\n\nActivating on Sphinx\n====================\n\nTo activate the extension, add it to your extensions variable in conf.py\nfor your project.\n\nActivating the extension in sphinx::\n\n extensions.append('sphinx_computron')\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pavel-kirienko/sphinx-computron", "keywords": "sphinx extension directive", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sphinx-computron", "package_url": "https://pypi.org/project/sphinx-computron/", "platform": "", "project_url": "https://pypi.org/project/sphinx-computron/", "project_urls": { "Homepage": "https://github.com/pavel-kirienko/sphinx-computron" }, "release_url": "https://pypi.org/project/sphinx-computron/0.1.0/", "requires_dist": [ "docutils", "sphinx" ], "requires_python": "", "summary": "Sphinx support for execution of python code from code blocks or files. Original code by JP Senior.", "version": "0.1.0" }, "last_serial": 5691996, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9bff259e826b165cdb1f8d63805ba543", "sha256": "9b7503cd26478ba3c873c2bc574f4cbc0b7cd1da212b226643eb9b01a41bbb95" }, "downloads": -1, "filename": "sphinx_computron-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9bff259e826b165cdb1f8d63805ba543", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4445, "upload_time": "2019-08-17T15:48:28", "url": "https://files.pythonhosted.org/packages/4d/78/05bbec8020bf503dc626db64ffc8f5a720c9bc440269330f157a31d38a55/sphinx_computron-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ccb259dd3a3b356a52ceb7a27cd8173", "sha256": "b71ca76a78c527af4434cd9e7706d9c6dddd61fa756cbcbd559cfc26be8389ea" }, "downloads": -1, "filename": "sphinx_computron-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9ccb259dd3a3b356a52ceb7a27cd8173", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3063, "upload_time": "2019-08-17T15:48:30", "url": "https://files.pythonhosted.org/packages/f7/62/df960afc4c73b09a6297c89e928e344ddc9b6f373c0a1dabf5752d24f88e/sphinx_computron-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9bff259e826b165cdb1f8d63805ba543", "sha256": "9b7503cd26478ba3c873c2bc574f4cbc0b7cd1da212b226643eb9b01a41bbb95" }, "downloads": -1, "filename": "sphinx_computron-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9bff259e826b165cdb1f8d63805ba543", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4445, "upload_time": "2019-08-17T15:48:28", "url": "https://files.pythonhosted.org/packages/4d/78/05bbec8020bf503dc626db64ffc8f5a720c9bc440269330f157a31d38a55/sphinx_computron-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ccb259dd3a3b356a52ceb7a27cd8173", "sha256": "b71ca76a78c527af4434cd9e7706d9c6dddd61fa756cbcbd559cfc26be8389ea" }, "downloads": -1, "filename": "sphinx_computron-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9ccb259dd3a3b356a52ceb7a27cd8173", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3063, "upload_time": "2019-08-17T15:48:30", "url": "https://files.pythonhosted.org/packages/f7/62/df960afc4c73b09a6297c89e928e344ddc9b6f373c0a1dabf5752d24f88e/sphinx_computron-0.1.0.tar.gz" } ] }