gaogaotiantian / watchpoints

watchpoints is an easy-to-use, intuitive variable/object monitor tool for python that behaves similar to watchpoints in gdb.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FileNotFoundError: [Errno 2] No such file or directory: '<stdin>'

youssefavx opened this issue · comments

When I run the first example in the terminal:

from watchpoints import watch
a = 0
watch(a)

I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/watchpoints/watch.py", line 28, in __call__
    argnodes = getargnodes(frame)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/watchpoints/util.py", line 43, in getargnodes
    line = getline(frame)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/watchpoints/util.py", line 19, in getline
    with open(filename, "r", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: '<stdin>'

Sorry just realized this only works for files (makes sense)

@youssefavx watchpoints works with REPL now.