Dev tools for python
Project description
Dev tools for python.
The debug print command python never had (and other things).
For more information, see documentation
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.3.tar.gz
(9.5 kB
view details)
Built Distribution
File details
Details for the file devtools-0.3.tar.gz
.
File metadata
- Download URL: devtools-0.3.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13cd487fb557ebf856da33ac5f6f81bc188c4b6374240b45a1d5f1115cb8abc2 |
|
MD5 | 06fac37dbcdffc30d3bb479da71befa1 |
|
BLAKE2b-256 | f47d9c7dc1ff30f19b8b2b1558be91e6b4a5258d6ea2b0cce5d1f7d0f15e38d6 |
File details
Details for the file devtools-0.3-py35,py36-none-any.whl
.
File metadata
- Download URL: devtools-0.3-py35,py36-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3.5,py36
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 528720acfdba01698b6239d0d79d55776929c103db5b7a81793d726ecb1383fe |
|
MD5 | e22faf142ff7f8b41c5c5cb2d31432da |
|
BLAKE2b-256 | 44b6a74e231d0a88eeee702d5e4ee07452d5afaa31513ea4ba12c51d2b58039a |