プロジェクト
GitHubで見る
samuelcolvin/python-devtools
概要
Python 開発ツール
開発ツール計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- -1
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルpython devtools
Python's missing debug print command and other development tools.
For more information, see documentation.
Install
Just
pip install devtools
If you've got python 3.10+ and pip installed, you're good to go.
Usage
from devtools import debug
whatever = [1, 2, 3]
debug(whatever)
Outputs:
test.py:4 <module>:
whatever: [1, 2, 3] (list) len=3
That's only the tip of the iceberg, for example:
import numpy as np
from devtools import debug
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
devtools can be used without from devtools import debug if you add debug into builtins
in sitecustomize.py.
For instructions on adding debug to builtins,
see the installation docs.
関連プロジェクトを探す
読み込み中…