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.0.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for pycomment-0.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 251d8e3da3843c696d62f567261c1f67bf4fd9862a2636ecf62a8d377cb02f9e |
|
MD5 | 94706c38e7e18dbc7cc35db25cabd6aa |
|
BLAKE2b-256 | 0212d09a5a1ea3d8e65cb8bd7fe6e3f11844e8bb7ceeb7b0ee15a54ede2b160f |