{ "info": { "author": "L\u00e9o Flaventin Hauchecorne", "author_email": "hl037.prog@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: Public Domain", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Debuggers" ], "description": "Introduction\n============\n\nQuick Debug functions to print informations on the context.\n\nEach function has 3 optional keyword-only arguments :\n\n- ``i`` : indent level (defaults to 0)\n- ``indent_str`` : indent string for one level (defaults to 2 spaces)\n- ``stream`` : file-like object to output (defaults to stderr)\n\nThese two last parameters are actually defaulted to the module variables `dbug._Dindent_str` and `dbug._Dstream`.\n\nEach functions ``F`` exist in 2 flavours :\n\n- ``F`` : normal\n- ``nF`` : print a new line before\n\nFunctions available\n===================\n\n- ``[n]D(*args, **kw)`` : Simply prints ``*args``\n- ``[n]Dvar(*expr, **kw)`` : Print for each expression ``expr`` : ``f'{expr} = {eval(expr)}\\n'``\n- ``[n]DWAI(**kw)`` : Print *W*-here *A*-m *I* with this format : ``module.function(param=val_param, param2=val_param2...) # /path/to/function/definition:line_of_DWAI_call``\n- ``[n]DNL(**kw)`` : Print a *N*-ew *L*-ine (``i`` and ``indeit_str`` have no effect on this one\n- ``Dnop(res, *args)`` : Returns ``res``, so that one can execute any side effect function in a list comprehension (best used with ``Dvar()``)\n- ``DnopL(*args, res)`` : Same as ``Dnop`` but execute the side effects first\n\nClasses Available\n=================\n\nThere is also the ``Dbug`` class which takes as parameters ``stream`` and ``indent_str`` and have the normal version of the previous functions without the leading D, passing them ``stream`` and defaulting the indent level to ``Dbug.indent_level``\n\n- ``Dbug.__call__(*args, **kw)`` calls ``D``\n- ``Dbug.var(*expr, **kw)`` calls ``Dvar``\n- ``Dbug.var(*expr, **kw)`` calls ``Dvar``\n- ``Dbug.WAI(**kw)`` calls ``DWAI``\n- ``Dbug.NL(**kw)`` calls ``NL``\n\nThis class is also a *context manager* and you can do things like ::\n\n with Dbug(open('log', 'w')) as D :\n D.WAI()\n D.var('a')\n\nAs a shortcut to change the indent level for a ``Dbug`` instance object, you can use the shift operator ::\n\n with Dbug(open('log', 'w')) as D :\n D.WAI()\n D>>1 # indent level is now 1\n D.var('a')\n D<<1 # indent level is back to 0\n\nInstallation\n============\n\n``pip install dbug``\n\n\n\n\n\n=======\nHISTORY\n=======\n\n\n1.0.b5\n------\n\n- **FIX** Intempestive print in ``D()``\n- **FIX** Readme orthograph\n\n1.0.b4\n------\n\n- **ADD** ``__all__`` module variable to export only relevent objects\n- **ADD** ``Dbug`` Class\n- **FIX** Typo on ``D()`` which prevented using the passed stream", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://leo-flaventin.com", "keywords": "", "license": "Public Domain", "maintainer": "", "maintainer_email": "", "name": "dbug", "package_url": "https://pypi.org/project/dbug/", "platform": "", "project_url": "https://pypi.org/project/dbug/", "project_urls": { "Homepage": "http://leo-flaventin.com" }, "release_url": "https://pypi.org/project/dbug/1.2/", "requires_dist": null, "requires_python": "", "summary": "Print tools for debuging", "version": "1.2" }, "last_serial": 5567546, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "515b399142057d171ef88df9f5136dba", "sha256": "10f8664162e290ec0238df0b04d8ff2eeac204581f26e80f295ea494d89eab9b" }, "downloads": -1, "filename": "dbug-1.0.tar.gz", "has_sig": false, "md5_digest": "515b399142057d171ef88df9f5136dba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4086, "upload_time": "2018-09-19T22:09:47", "url": "https://files.pythonhosted.org/packages/29/e7/3f51ba018a4b77759b87732e61cb2fa096151ee21e95d636e5b50a21a514/dbug-1.0.tar.gz" } ], "1.0b3": [ { "comment_text": "", "digests": { "md5": "f407915b26d280f066cc7e7b679950ba", "sha256": "d4b01f081bdd1ffa0b181744e42fae0e2350bfa92158e6dcfd3e599c540b56dd" }, "downloads": -1, "filename": "dbug-1.0b3.tar.gz", "has_sig": false, "md5_digest": "f407915b26d280f066cc7e7b679950ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3176, "upload_time": "2018-04-30T20:34:43", "url": "https://files.pythonhosted.org/packages/e2/a2/243e56b162112d222c94ea1b267456215c01d4f04f8a8d24b13d0a279af0/dbug-1.0b3.tar.gz" } ], "1.0b5": [ { "comment_text": "", "digests": { "md5": "a9c8d8c9ca371abc839938c45aed092d", "sha256": "04ffd2c82665e5419f6730a705029311e4de36f189780a8717d82d153565090e" }, "downloads": -1, "filename": "dbug-1.0b5.tar.gz", "has_sig": false, "md5_digest": "a9c8d8c9ca371abc839938c45aed092d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3869, "upload_time": "2018-05-08T09:52:38", "url": "https://files.pythonhosted.org/packages/a0/46/040c766ee0046d97c6b279e954e879c3658bb9e3ca75154a05a546240818/dbug-1.0b5.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "f442cdf7166562ff82954d68eb9db49f", "sha256": "c9790c9631aa746b441d80691e2a377db31c00704ccff12feb1d9713e6a92936" }, "downloads": -1, "filename": "dbug-1.2.tar.gz", "has_sig": false, "md5_digest": "f442cdf7166562ff82954d68eb9db49f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4281, "upload_time": "2019-07-22T13:47:33", "url": "https://files.pythonhosted.org/packages/d3/01/26b4952e183f734dd72c9780c9119e1f6e0827bfa0b02a50b2d56cfe4b72/dbug-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f442cdf7166562ff82954d68eb9db49f", "sha256": "c9790c9631aa746b441d80691e2a377db31c00704ccff12feb1d9713e6a92936" }, "downloads": -1, "filename": "dbug-1.2.tar.gz", "has_sig": false, "md5_digest": "f442cdf7166562ff82954d68eb9db49f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4281, "upload_time": "2019-07-22T13:47:33", "url": "https://files.pythonhosted.org/packages/d3/01/26b4952e183f734dd72c9780c9119e1f6e0827bfa0b02a50b2d56cfe4b72/dbug-1.2.tar.gz" } ] }