Skip to main content

No project description provided

Project description

Travis Codecov Appveyor Pypi

Tools for static and dynamic code introspection.

Helps with writing doctests

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
    """

Helps with code that generates code

>>> 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']

See Also: https://github.com/Erotemic/xdev

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

xinspect-0.1.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

xinspect-0.1.0-py2.py3-none-any.whl (14.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file xinspect-0.1.0.tar.gz.

File metadata

  • Download URL: xinspect-0.1.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for xinspect-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6afada76541549634fd4beea8115711ca523e7353e20b25407f44bc3e98d79e9
MD5 e6b202812e41bf0db9741911c000e19e
BLAKE2b-256 ce36ccff0af3a05f01b84a8b8e8d996fd7d3c29da94e9c74f645fa01746e13f7

See more details on using hashes here.

File details

Details for the file xinspect-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: xinspect-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for xinspect-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b6e589f85227631199d4dcc4ab0cf43b422c1f11d37030edb121d9ebbca38255
MD5 4f98638bc75f8c9e079170ac8b2aee2a
BLAKE2b-256 44db3293d584e55959d723b0d3a2501a617e06c4cee0fe6256349de6c7ccc4d0

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