Skip to main content

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


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.3.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

pycomment-0.0.3-py2.py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page