pycomment 0.1.1

Last updated:

0 purchases

pycomment 0.1.1 Image
pycomment 0.1.1 Images
Add to Cart

Description:

pycomment 0.1.1

pycomment
Inserting repr value on comment with marker (marker is # =>).
This is heavily inspired by xmpfilter of ruby’s rocodetools

install
$ 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.1.1

fix import module is failed at same directory (#18)

0.1.0

exec in tempfile, so more robust (#17)

0.0.6

multi-line output with indentation (support completely) (#14)

0.0.4:

multi-line output support (#12)
-i option is added, same as –inplace (#7)

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.