{ "info": { "author": "Adrian Kuhn", "author_email": "akuhnplus@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Print statement considered harmful\n==================================\n\nSwitch from ``print`` to ``debugger()`` and never look back.\n\n::\n\n import debug\n\n debugger() # <-- breaks here\n\nImport this module in your main file to add ``debugger`` as a builtin\ncommand.\n\nDocumentation\n-------------\n\nAll functions\n\n::\n\n debugger()\n debugger.enable()\n debugger.disable()\n debug.wrap(function)\n debug.sample(function)\n function.samples\n\nCalling ``debugger`` opens the ``ipdb`` debugger,\n\n::\n\n import debug\n\n debugger() # <-- breaks here\n\nCalling ``debugger.disable`` from the ipdb prompt disables all\nbreakpoints,\n\n::\n\n import debug\n\n debugger() # <-- breaks here\n\n # >> debugger.disable()\n # >> continue\n\n debugger() # <-- does not break here\n\nUsing ``debug.wrap`` sets a function breakpoint,\n\n::\n\n def fun():\n pass\n\n def example():\n fun()\n\n fun = debug.wrap(fun)\n example() # <-- breaks above at definition of fun\n\nUsing ``debug.sample`` collects function arguments,\n\n::\n\n def fun(a, b=None):\n return\n\n fun = debug.sample(fun)\n fun(23)\n fun(42, 'hello worlds')\n\n debugger() # <-- breaks here\n\n # >> len(fun.samples)\n # 2\n # >> fun.samples\n # [{0: 23, '$': 529}, {0: 42, 'b': 'hello worlds', '$': 1764}]\n\nUsing ``debug.log`` collects values,\n\n::\n\n for each in range(3):\n debug.log(each)\n\n debugger() # <-- breaks here\n\n # >> debugger.logs\n # {'example.py': {2: [0, 1, 2]}}\n\nInstallation\n------------\n\nTo install this package, run\n\n::\n\n pip install print-considered-harmful\n\nContributing\n------------\n\nBug reports and pull requests are welcome on github at,\nhttps://github.com/akuhn/print-considered-harmful", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/akuhn/print-considered-harmful", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "print-considered-harmful", "package_url": "https://pypi.org/project/print-considered-harmful/", "platform": "", "project_url": "https://pypi.org/project/print-considered-harmful/", "project_urls": { "Homepage": "https://github.com/akuhn/print-considered-harmful" }, "release_url": "https://pypi.org/project/print-considered-harmful/1.4.0/", "requires_dist": null, "requires_python": "", "summary": "Switch from print to debugger() and never look back!", "version": "1.4.0" }, "last_serial": 3784064, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "14faa24da23ccab3ce6da5edbc233a07", "sha256": "bc1d5be7778b527830ac4aaf268f7dac38f071405af67c9271816c7e8882d919" }, "downloads": -1, "filename": "print-considered-harmful-1.0.1.tar.gz", "has_sig": false, "md5_digest": "14faa24da23ccab3ce6da5edbc233a07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1126, "upload_time": "2018-03-31T19:58:32", "url": "https://files.pythonhosted.org/packages/e5/35/8abcb8d0ab5f66d76a48ed491dc88dd569ca5894d38cf8111a7a17474e2b/print-considered-harmful-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "bad13977db2f74a4628039061436a920", "sha256": "12da2563babb4fbc865efd6016fda99f7a5e124b517464acaf9956d71f66144c" }, "downloads": -1, "filename": "print-considered-harmful-1.1.0.tar.gz", "has_sig": false, "md5_digest": "bad13977db2f74a4628039061436a920", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1278, "upload_time": "2018-04-02T02:25:57", "url": "https://files.pythonhosted.org/packages/63/8d/40ba1c978756c68338e505f3a7e76689d16fd4eec52559b2865b5385f81a/print-considered-harmful-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "5cb8bc42fb568f029a46846434e723ea", "sha256": "55f7d2f4ff8f8d53ba1aff9e6cbb1e0a029a3ea1638a95cb0fa27fceebca4f5f" }, "downloads": -1, "filename": "print-considered-harmful-1.2.0.tar.gz", "has_sig": false, "md5_digest": "5cb8bc42fb568f029a46846434e723ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1534, "upload_time": "2018-04-02T02:47:37", "url": "https://files.pythonhosted.org/packages/1f/a9/82798e37947fe906c9f998e8baf645d90bf77cc45da5816ef65f7a99e05a/print-considered-harmful-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "f23b6a1d46722965e2ed668f705e68de", "sha256": "f8c99eca353736c6ac410a63a0f2427c63379f3b431f77deb275d2856a21e6e9" }, "downloads": -1, "filename": "print-considered-harmful-1.3.0.tar.gz", "has_sig": false, "md5_digest": "f23b6a1d46722965e2ed668f705e68de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1747, "upload_time": "2018-04-02T03:07:02", "url": "https://files.pythonhosted.org/packages/9e/7a/7aafcb4ee8c68f75ec0bd249bdd140c33cb082fa7407f126730bfd26b292/print-considered-harmful-1.3.0.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "de4d7c05fd9f536818cff8ae2cbd74d3", "sha256": "894e681847f8b63531c05c4844366019d5e7e8df9d442898e5e20fbe8f440eaa" }, "downloads": -1, "filename": "print-considered-harmful-1.4.0.tar.gz", "has_sig": false, "md5_digest": "de4d7c05fd9f536818cff8ae2cbd74d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1832, "upload_time": "2018-04-20T11:35:31", "url": "https://files.pythonhosted.org/packages/87/3e/a2943e57e7f02273632d4dd1bb816bf63e7f4526f025942715af9e7d5f7a/print-considered-harmful-1.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "de4d7c05fd9f536818cff8ae2cbd74d3", "sha256": "894e681847f8b63531c05c4844366019d5e7e8df9d442898e5e20fbe8f440eaa" }, "downloads": -1, "filename": "print-considered-harmful-1.4.0.tar.gz", "has_sig": false, "md5_digest": "de4d7c05fd9f536818cff8ae2cbd74d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1832, "upload_time": "2018-04-20T11:35:31", "url": "https://files.pythonhosted.org/packages/87/3e/a2943e57e7f02273632d4dd1bb816bf63e7f4526f025942715af9e7d5f7a/print-considered-harmful-1.4.0.tar.gz" } ] }