{ "info": { "author": "BoppreH", "author_email": "boppreh@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: Unix", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "Modify your own source code with this piece of Python black magic.\r\n\r\nWhen a piece of code calls ``replace_me(value)``, that line will be\r\nreplaced with the given ``value``. If you want to insert a comment and\r\nkeep the line that inserted it, use ``insert_comment(value)``.\r\n\r\n**ATTENTION**: Calling these functions will modify your source code.\r\nKeep backups.\r\n\r\nExample:\r\n\r\n::\r\n\r\n from replace_me import replace_me, insert_comment\r\n\r\n # If you run this program, this source code will change.\r\n\r\n # These two lines will become the same:\r\n # Hello World\r\n replace_me(\"Hello World\", as_comment=True)\r\n\r\n # Code generation. Creates a hard coded list of 100 numbers.\r\n replace_me('numbers = ' + str(list(range(100))))\r\n\r\n import random\r\n # The next comment will be replaced with a random number.\r\n insert_comment(random.randint(1, 10))\r\n # ??\r\n\r\n # Pseudo-quine, replaces the line with itself.\r\n quine = 'replace_me(quine)'\r\n replace_me(quine)\r\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/boppreh/replace_me", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "replace_me", "package_url": "https://pypi.org/project/replace_me/", "platform": "", "project_url": "https://pypi.org/project/replace_me/", "project_urls": { "Homepage": "https://github.com/boppreh/replace_me" }, "release_url": "https://pypi.org/project/replace_me/0.1.4/", "requires_dist": null, "requires_python": "", "summary": "Modify your own source code with this piece of Python black magic", "version": "0.1.4" }, "last_serial": 3065191, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6c354e8ad69be3a5ab8b6b0ebc385e41", "sha256": "f0d07f0e6f868da4b0351d2874b8d82cb32ba80a77d0e6cd4bda50b3ff8b1223" }, "downloads": -1, "filename": "replace_me-0.1.0.zip", "has_sig": false, "md5_digest": "6c354e8ad69be3a5ab8b6b0ebc385e41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2831, "upload_time": "2017-08-01T18:45:23", "url": "https://files.pythonhosted.org/packages/6d/f4/748255ecf7d4c21bc67c79a0760fa4761db750e57c41050d73b4fe39dc1c/replace_me-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ff3ec238b26516d9eccb798c32bc4c12", "sha256": "ecdb3c707334192736a62c6140f98a0d3a16d54e062d449ae6dda5b3511e9422" }, "downloads": -1, "filename": "replace_me-0.1.1.zip", "has_sig": false, "md5_digest": "ff3ec238b26516d9eccb798c32bc4c12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3668, "upload_time": "2017-08-01T18:50:45", "url": "https://files.pythonhosted.org/packages/95/20/ba3d1f38dc08808a93ae7b6d235b3b5b45b9dfeeafa78b39a7b660a5e53b/replace_me-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "bc44746ba36819a301892c65881a0d82", "sha256": "b2d1dfe60863928aabfbb95d37ca31f766bdcb314e4e1b3f18e0c7dd8d6f3e52" }, "downloads": -1, "filename": "replace_me-0.1.2.zip", "has_sig": false, "md5_digest": "bc44746ba36819a301892c65881a0d82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4826, "upload_time": "2017-08-01T18:55:04", "url": "https://files.pythonhosted.org/packages/5d/1e/7bca7fc2e1ceb35a10d160fbda02c7f567b68e79d6161989bedffd2c0306/replace_me-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "a86d7b3f865e90744092937d3a62d2b3", "sha256": "2d6e4e04ededae4987c427075fb9bf70f4c6f7d4918a2fc0aee6747ba97e2117" }, "downloads": -1, "filename": "replace_me-0.1.3.tar.gz", "has_sig": false, "md5_digest": "a86d7b3f865e90744092937d3a62d2b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2415, "upload_time": "2017-08-01T18:57:32", "url": "https://files.pythonhosted.org/packages/b1/02/aa1076b079a226cef560034ceeef0f67f82601cd09ea73fe7ac75093c811/replace_me-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "5d12777de5675b3da99ed075aed9ac6b", "sha256": "99179545a9f554571a243d7ac5ba3d732e158a3f07a39e78dd7cba055d5673c9" }, "downloads": -1, "filename": "replace_me-0.1.4.tar.gz", "has_sig": false, "md5_digest": "5d12777de5675b3da99ed075aed9ac6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2473, "upload_time": "2017-08-01T19:02:48", "url": "https://files.pythonhosted.org/packages/e2/47/94ea09325e1674db48dc3f9a66e2535e49840c69dbdd24eb1c831e308eee/replace_me-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5d12777de5675b3da99ed075aed9ac6b", "sha256": "99179545a9f554571a243d7ac5ba3d732e158a3f07a39e78dd7cba055d5673c9" }, "downloads": -1, "filename": "replace_me-0.1.4.tar.gz", "has_sig": false, "md5_digest": "5d12777de5675b3da99ed075aed9ac6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2473, "upload_time": "2017-08-01T19:02:48", "url": "https://files.pythonhosted.org/packages/e2/47/94ea09325e1674db48dc3f9a66e2535e49840c69dbdd24eb1c831e308eee/replace_me-0.1.4.tar.gz" } ] }