No project description provided
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file xinspect-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: xinspect-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43e4ab01036d1e527834ce2c9424c82a76d0bcd31f986b2da6816fcaafa75715 |
|
MD5 | d314c4b286fae4050c40d5acfbee041d |
|
BLAKE2b-256 | c9b82f0d53bb04b4555d07ce46ed444b41c4cc6136391586fa462d8e4a5dd4e7 |