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 Distribution
xinspect-0.2.0.tar.gz
(14.2 kB
view details)
Built Distribution
File details
Details for the file xinspect-0.2.0.tar.gz
.
File metadata
- Download URL: xinspect-0.2.0.tar.gz
- Upload date:
- Size: 14.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71eb0f2a2457a49c5bedaa0d194c3bd5cf09cfaa3276e1bedb6a48ac52e33e3f |
|
MD5 | f8bad646ff4c12c30cf325185cef7caf |
|
BLAKE2b-256 | a98d24918153204cb0c681003e8bb959db0d7f2458c0422292ca3a14f306b859 |
Provenance
File details
Details for the file xinspect-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: xinspect-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 14.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35da5bd755ac4eddc4f22900fa843bebe71b4ffb96bcb8ba968551cf59b72b6b |
|
MD5 | 858d209a75d7ad7fe9c54ad758e0df60 |
|
BLAKE2b-256 | 21e9e0f989ad93a174fdfbaf58f92ac63772f82737ecd37288fcc7fde80bcf52 |