Skip to main content

An excellent developer tool for excellent developers

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-1.2.0.tar.gz (82.5 kB view details)

Uploaded Source

Built Distribution

xdev-1.2.0-py3-none-any.whl (87.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xdev-1.2.0.tar.gz
  • Upload date:
  • Size: 82.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for xdev-1.2.0.tar.gz
Algorithm Hash digest
SHA256 f63513d31a15c44906ed62802ef36bdeaadfc9f51a11ab80dba90c0578883950
MD5 3463185dc4bb7c83bec7f0e612f8fb44
BLAKE2b-256 b0fe3e1936f37a525954c175f3a7c6c7f17d68fd63fe8cb93f33a5b20202256d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xdev-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 87.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for xdev-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70a05fe18969971743c34cff32e4e32b364423227beb592e42aa9eaea9b89e44
MD5 03241f0f288759868b1565a5c059ff61
BLAKE2b-256 ca3d1519c661f04b6032a8a3e8d7f1995902bff33a179e5d3d81980a9d75a2eb

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