pycomment
Inserting repr value on comment with marker (marker is # =>). This is heavily inspired by xmpfilter of ruby’s rocodetools
install
warning: in the future (not yet)
$ pip install pycomment
how to use
code.py
import sys
print("stderr", file=sys.stderr)
print("hello")
1 + 2 + 3 + 3 + 4 + 5 # =>
1 + 2 + 3 + 3 + 4 + 5 # =>
print("bye")
$ pycomment --inplace code.py
import sys
print("stderr", file=sys.stderr)
print("hello")
1 + 2 + 3 + 3 + 4 + 5 # => 18
1 + 2 + 3 + 3 + 4 + 5 # => 18
print("bye")
# -- stdout --------------------
# >> hello
# >> bye
multi-line output
import numpy as np
np.arange(9).reshape((3, 3)) # => multi-line..
# array([[0, 1, 2],
# [3, 4, 5],
# [6, 7, 8]])
# ..multi-line
0.0.4:
multi-line output suppor (#12)
-i option is added, same as –inplace (#7)
Metadata
Release files for pycomment 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pycomment-0.0.4.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycomment-0.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 11.9 kB
Release files / pycomment-0.0.4.tar.gz
| Download URL | pycomment-0.0.4.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cd0c7abc2288494e3540e7ae84a8471611c6fb3e691b61cf26bb78a1d3a83a5
|
|
BLAKE2b-256 checksum How to use checksums |
47be469fa6ca6da1100487a1b70318fce7b8f0b0a0363ceab6dc9650995aba7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.3
|
Release files / pycomment-0.0.4-py2.py3-none-any.whl
| Download URL | pycomment-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
da8543fdf8b9b762d789f1a7a30c48fdac5e1dee4dc11caee767fcfe682104d8
|
|
BLAKE2b-256 checksum How to use checksums |
4a0928a090e28de174613556ca18f358ec5747a2cad7d4fd25d89549a79b956d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.3
|