Dev tools for python
Project description
Dev tools for python.
Install
Just:
pip install devtools[pygments]
(pygments is not required but if it’s available output will be highlighted and easier to read.)
Usage
from devtools import debug
whatever = [1, 2, 3]
debug(whatever)
Outputs:
test.py:4 <module>: whatever: [1, 2, 3] (list)
That’s only the tip of the iceberg, for example:
import numpy as np
data = {
'foo': np.array(range(20)),
'bar': {'apple', 'banana', 'carrot', 'grapefruit'},
'spam': [{'a': i, 'b': (i for i in range(3))} for i in range(3)],
'sentence': 'this is just a boring sentence.\n' * 4
}
debug(data)
outputs:
Usage without Import
modify /usr/lib/python3.6/sitecustomize.py making debug available in any python 3.6 code
# add devtools debug to builtins
try:
from devtools import debug
except ImportError:
pass
else:
__builtins__['debug'] = debug
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
devtools-0.2.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for devtools-0.2-py35,py36-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02fc6490715d17bcf02aa2687d1885246ac523962d3a7104e657c3cf7745cf64 |
|
MD5 | fc0723bd7b543bb85cbba7a078b513ca |
|
BLAKE2b-256 | 37311bba3ce4cfa5ff67cc37b6555ef7da5118b3cfe9782c866deb0ede9c9655 |