Skip to main content

Developer tools

Project description

Xdev - Excellent Developer

GithubActions CircleCI Codecov Pypi Downloads ReadTheDocs

Xdev is an excellent developer tool for excellent developers. It contains miscellaneous and/or interactive debugging tools.

I mostly maintain this for myself, but I could see polishing it up in the future.

Remarks

Perhaps I should just use ipdb but I often just like to directly embed with IPython whenever I want:

import xdev
xdev.embed()

Or wherever I want whenever there is an exception.

import xdev
with xdev.embed_on_exception_context:
    some_code()

I don’t feel like I need ipdb’s other features.

I also like to

def func(a=1, b=2, c=3):
    """
    Example:
        >>> from this.module import *  # import contextual namespace
        >>> import xinspect
        >>> globals().update(xinspect.get_func_kwargs(func))  # populates globals with default kwarg value
        >>> print(a + b + c)
        6
    """

But I know these things are a little dirty.

But these aren’t production practices. These are development tricks and life hacks to make working faster.

Also see xinspect for things like autogen_imports

>>> import ubelt as ub
>>> source = ub.codeblock(
>>>     '''
>>>     p = os.path.dirname(join('a', 'b'))
>>>     glob.glob(p)
>>>     ''')
>>> # Generate a list of lines to fix the name errors
>>> lines = autogen_imports(source=source)
>>> print(lines)
['import glob', 'from os.path import join', 'import os']

https://github.com/Erotemic/xinspect

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xdev-0.3.0.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

xdev-0.3.0-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file xdev-0.3.0.tar.gz.

File metadata

  • Download URL: xdev-0.3.0.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for xdev-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8809e2e898fe95f98361873ec062f741c2ea645b1f246d74fcb41fc5c63bd884
MD5 7fb5080189bdaac9e0f1c1f194d04ce1
BLAKE2b-256 7c49fc82f6177ac58acb589ecc6e1419dadf484aedbb61cddbc201724289a1c0

See more details on using hashes here.

File details

Details for the file xdev-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: xdev-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for xdev-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a3dce00bcebfb6b5f706bc67a59bb10f7297a5d6982ef3f96bd081ea48e975d
MD5 79d28c7c1ea57a3fa31ba610e4ca6d4d
BLAKE2b-256 54bb4f03f2639a29f91e8071f871ed61c16cb2bf0ed856b078a632e069be7cc8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page