{ "info": { "author": "Hiroyuki Ohsaki", "author_email": "ohsaki@lsnl.jp", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# tbdump Package\n\ntbdump - display helpful information for debbugging in case of errors/exceptions\n\n# DESCRIPTION\n\nThis manual page documents **tbdump** module, a Python module that displays\ndetailed information, which should be useful for debugging, when the Python\ninterpreter is aborted due to errors or traps.\n\nPython displays minimal information in case of errors such as the type of\nexception and the line number of the source code where the program execution\nis terminated. **tbdump** replaces the Python's hook `sys.excepthook` which\nwill be called when an exception is occured, so that more detailed information\non the program status (i.e., the location at which the exception occurred, all\nvariables and objects as well as their attributes defined in the scope), which\nsignificantly helps your debugging.\n\nAlso, at the exception, **tbdump** invokes **pdb**, Python debugger. So, you\ncan freely examine the state of the program using many **pdb** debugger\ncommands.\n\n# EXAMPLE\n\nBy default, Python tells little about the error.\n\ntest.py:\n\n```python\nimport sys\nfrom collections import namedtuple\n\nRecord = namedtuple('Record', 'name year size note')\nx = Record('John', 2019, 123, 'Good')\ny = Record('Mike', 2018, 456)\n```\n\n```sh\n$ python3 test.py\nTraceback (most recent call last):\n File \"test.py\", line 6, in \n y = Record('Mike', 2018, 456)\nTypeError: __new__() missing 1 required positional argument: 'note'\n```\n\nWith **tbdump**, you can have details.\n\ntest-tbdump.py:\n\n```python\nimport sys\nfrom collections import namedtuple\n\nimport tbdump\n\nRecord = namedtuple('Record', 'name year size note')\nx = Record('John', 2019, 123, 'Good')\ny = Record('Mike', 2018, 456)\n```\n\n```sh\n$ python3 test-tbdump.py\n---- test-tbdump.py\n 4 import tbdump\n 5 \n 6 Record = namedtuple('Record', 'name year size note')\n 7 x = Record('John', 2019, 123, 'Good')\n 8 y = Record('Mike', 2018, 456)\n Record = \n _asdict \n _fields ('name', 'year', 'size', 'note')\n _fields_defaults {}\n _make \n _replace \n name \n note \n size \n year \n __doc__ 'Record(name, year, size, note)'\n __getnewargs__ \n __module__ '__main__'\n __new__ \n __repr__ \n __slots__ ()\n namedtuple = \n sys = ...\n tbdump = \n linecache \n pdb \n print_tb \n sys \n term \n __builtins__ {'__name__': 'builtins', '__doc__': \"Built-in functi...\n __cached__ '/pub/home/ohsaki/lib/python/__pycache__/tbdump.cpyt...\n __doc__ None\n __file__ '/pub/home/ohsaki/lib/python/tbdump.py'\n __loader__ <_frozen_importlib_external.SourceFileLoader object ...\n __name__ 'tbdump'\n __package__ ''\n __spec__ ModuleSpec(name='tbdump', loader=<_frozen_importlib_...\n x = Record(name='John', year=2019, size=123, note='Good')\n __annotations__ = {}\n __builtins__ = ...\n __cached__ = None\n __doc__ = None\n __file__ = '/tmp/4.py'\n __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x7f3...\n name '__main__'\n path '/tmp/4.py'\n __name__ = '__main__'\n __package__ = None\n __spec__ = None\nTypeError: __new__() missing 1 required positional argument: 'note'\n\n> test-tbdump.py(8)()\n-> y = Record('Mike', 2018, 456)\n(Pdb) \n```\n\nYou are now in the **pdb** debugger. You can examine the internals:\n\n```sh\n(Pdb) x\nRecord(name='John', year=2019, size=123, note='Good')\n(Pdb) x.name\n'John'\n(Pdb) Record\n\n(Pdb) list\n 3 \t\n 4 \timport tbdump\n 5 \t\n 6 \tRecord = namedtuple('Record', 'name year size note')\n 7 \tx = Record('John', 2019, 123, 'Good')\n 8 ->\ty = Record('Mike', 2018, 456)\n[EOF]\n(Pdb) \n```\n\n# INSTALLATION\n\n```python\npip3 install tbdump\n```\n\n# AVAILABILITY\n\nThe latest version of **tbdump** module is available at\nPyPI (https://pypi.org/project/tbdump/) .\n\n# SEE ALSO\n\npdb - The Python Debugger (https://docs.python.org/3.7/library/pdb.html)\n\ntraceback - Print or retrieve a stack traceback (https://docs.python.org/3.7/library/traceback.html)\n\n# AUTHOR\n\nHiroyuki Ohsaki \n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/h-ohsaki/tbdump", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "tbdump", "package_url": "https://pypi.org/project/tbdump/", "platform": "", "project_url": "https://pypi.org/project/tbdump/", "project_urls": { "Homepage": "https://github.com/h-ohsaki/tbdump" }, "release_url": "https://pypi.org/project/tbdump/1.0/", "requires_dist": null, "requires_python": "", "summary": "Display helpful information for debbugging in case of errors/exceptions", "version": "1.0" }, "last_serial": 5492303, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "687cd9df359d92d690b638e59898f017", "sha256": "7fc1de572ad081071f338f792d8552c1e91ce3977629832695e3f0c9b6441cf6" }, "downloads": -1, "filename": "tbdump-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "687cd9df359d92d690b638e59898f017", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17309, "upload_time": "2019-07-05T16:52:26", "url": "https://files.pythonhosted.org/packages/7c/1a/cd01a72c75924ab456320c5721e3583a0994a726029317bfc2d049ae21b8/tbdump-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8db16f0144a246b2edf31936ef00d5fc", "sha256": "3f7f5548060847403fee1913fe697a98e25de48ab91e1f9fffea1ebe8662e656" }, "downloads": -1, "filename": "tbdump-1.0.tar.gz", "has_sig": false, "md5_digest": "8db16f0144a246b2edf31936ef00d5fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5065, "upload_time": "2019-07-05T16:52:29", "url": "https://files.pythonhosted.org/packages/64/b5/3a2d1c00a4a78db8f5916f538cb094aea6879b7bd9842b1d18b921d013cd/tbdump-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "687cd9df359d92d690b638e59898f017", "sha256": "7fc1de572ad081071f338f792d8552c1e91ce3977629832695e3f0c9b6441cf6" }, "downloads": -1, "filename": "tbdump-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "687cd9df359d92d690b638e59898f017", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17309, "upload_time": "2019-07-05T16:52:26", "url": "https://files.pythonhosted.org/packages/7c/1a/cd01a72c75924ab456320c5721e3583a0994a726029317bfc2d049ae21b8/tbdump-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8db16f0144a246b2edf31936ef00d5fc", "sha256": "3f7f5548060847403fee1913fe697a98e25de48ab91e1f9fffea1ebe8662e656" }, "downloads": -1, "filename": "tbdump-1.0.tar.gz", "has_sig": false, "md5_digest": "8db16f0144a246b2edf31936ef00d5fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5065, "upload_time": "2019-07-05T16:52:29", "url": "https://files.pythonhosted.org/packages/64/b5/3a2d1c00a4a78db8f5916f538cb094aea6879b7bd9842b1d18b921d013cd/tbdump-1.0.tar.gz" } ] }