with repr value at comment
Project description
Inserting repr value on commen 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
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
pycomment-0.0.2.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for pycomment-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26fbb6fffb27e7db46f2ef1561b7df771fa3128e4610fe735574f5425c5d47a8 |
|
MD5 | 0393a38835045664ffe01d25a236d9bb |
|
BLAKE2b-256 | e47d9eb2306be41c8c01dc0fa8f9be6fde0c8e9097ba19184b26e76330ee8a21 |