{ "info": { "author": "Juha Jeronen", "author_email": "juha.m.jeronen@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Framework :: IPython", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Imacropy is interactive macropy.\n\nWe provide some agile-development addons for MacroPy, namely a generic\nmacro-enabling bootstrapper, and an IPython extension to macro-enable its REPL.\n\n**Bootstrapper**:\n\nThe bootstrapper imports the specified file or module, pretending its ``__name__``\nis ``\"__main__\"``. This allows your main program to use macros.\n\nFor example, ``some_program.py``::\n\n from simplelet import macros, let\n\n def main():\n x = let((y, 21))[2*y]\n assert x == 42\n print(\"All OK\")\n\n if __name__ == \"__main__\":\n main()\n\nStart it as::\n\n macropy3 some_program.py\n\nor::\n\n macropy3 -m some_program\n\nThe only command-line switch the bootstrapper supports is ``-m module_name``. If\nyou need to set other Python command-line options::\n\n python3 -m macropy3 -m some_program\n\nThe first ``-m`` goes to Python itself, the second to the ``macropy3`` bootstrapper.\n\n**IPython extension**:\n\nThe extension allows to **use macros in the IPython REPL**. (*Defining* macros\nin the REPL is currently not supported.)\n\nFor example::\n\n In [1]: from simplelet import macros, let\n\n In [2]: let((x, 21))[2*x]\n Out[2]: 42\n\nA from-import of macros from a given module clears from the REPL session **all**\ncurrent macros loaded from that module, and loads the latest definitions **of\nonly the specified** macros from disk. This allows interactive testing when\nediting macros.\n\nThe most recent definition of any given macro remains alive until the next macro\nfrom-import from the same module, or until the IPython session is terminated.\n\nMacro docstrings and source code can be viewed using ``?`` and ``??``, as usual.\n\nTo load the extension once, ``%load_ext imacropy.console``.\n\nTo autoload it when IPython starts, add ``\"imacropy.console\"`` to the list\n``c.InteractiveShellApp.extensions`` in your ``ipython_config.py``. To find\nthe config file, ``ipython profile locate``.\n\nWhen the extension loads, it imports ``macropy`` into the REPL session. You can\nuse this to debug whether it is loaded, if necessary.\n\nCurrently **no startup banner is printed**, because extension loading occurs\nafter IPython has already printed its own banner. We cannot manually print a\nbanner, because some tools (notably ``importmagic.el`` for Emacs, included in\nSpacemacs) treat the situation as a fatal error in Python interpreter startup if\nanything is printed (and ``ipython3 --no-banner`` is rather convenient to have\nas the python-shell, to run IPython in Emacs's inferior-shell mode).\n\nFor more details, see the docstring of ``imacropy.console``.\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/Technologicat/imacropy", "keywords": "metaprogramming,syntactic-macros,macropy", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "imacropy", "package_url": "https://pypi.org/project/imacropy/", "platform": "Linux", "project_url": "https://pypi.org/project/imacropy/", "project_urls": { "Homepage": "https://github.com/Technologicat/imacropy" }, "release_url": "https://pypi.org/project/imacropy/0.1.0/", "requires_dist": [ "macropy3" ], "requires_python": "", "summary": "Interactive MacroPy - IPython REPL, generic bootstrapper.", "version": "0.1.0" }, "last_serial": 5276755, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f8c068419e74bf3e6ffed3453d8b7fd7", "sha256": "bfd6fafb8a2ec2294616c394264d3fd982016cd2e9104fe9a7e59e5c9fd0113b" }, "downloads": -1, "filename": "imacropy-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f8c068419e74bf3e6ffed3453d8b7fd7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13669, "upload_time": "2019-05-16T10:16:27", "url": "https://files.pythonhosted.org/packages/64/95/1f8894eed4a891dc563234904991a65ca30fb69bb4018d70c73d79bb8c55/imacropy-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c50899a4c1f59273e92b8f04edeb0ebd", "sha256": "9645c5a99bdf6aa9a1d2f75363ca934ee881d52751cb5614a30f03f4b2c743cd" }, "downloads": -1, "filename": "imacropy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c50899a4c1f59273e92b8f04edeb0ebd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11562, "upload_time": "2019-05-16T10:16:29", "url": "https://files.pythonhosted.org/packages/e4/a4/83acc60e3bdc44c8f06998b1ebe38b958b79da4f7f7b97c284512fd71af5/imacropy-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f8c068419e74bf3e6ffed3453d8b7fd7", "sha256": "bfd6fafb8a2ec2294616c394264d3fd982016cd2e9104fe9a7e59e5c9fd0113b" }, "downloads": -1, "filename": "imacropy-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f8c068419e74bf3e6ffed3453d8b7fd7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13669, "upload_time": "2019-05-16T10:16:27", "url": "https://files.pythonhosted.org/packages/64/95/1f8894eed4a891dc563234904991a65ca30fb69bb4018d70c73d79bb8c55/imacropy-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c50899a4c1f59273e92b8f04edeb0ebd", "sha256": "9645c5a99bdf6aa9a1d2f75363ca934ee881d52751cb5614a30f03f4b2c743cd" }, "downloads": -1, "filename": "imacropy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c50899a4c1f59273e92b8f04edeb0ebd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11562, "upload_time": "2019-05-16T10:16:29", "url": "https://files.pythonhosted.org/packages/e4/a4/83acc60e3bdc44c8f06998b1ebe38b958b79da4f7f7b97c284512fd71af5/imacropy-0.1.0.tar.gz" } ] }