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

Uploaded Source

Built Distribution

xdev-1.1.1-py3-none-any.whl (88.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xdev-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6342ab04be93fd98a19d841090af0d88ba507353b6408acabeeabb759e37868c
MD5 66308b79091b801800d23a77a980f7a8
BLAKE2b-256 24f5e06e9e70d60b75c1017f635d45c3e63a79165a1ecaf8551594aed4e7f4db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xdev-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 88.3 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f69a66a3c02320f8ac08518a049b3f939c48ea702bcecea0a27848227e247be
MD5 59617ee9d2eef599145d51dc74c7f886
BLAKE2b-256 4e800df391185f0b5e77e77f5e6d62c745450cabac228c4bb0a6919ff49aea47

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