Broken mental model -- documentation
I've installed trepan3k in my python34 environment. I can run trepan3k. I can invoke it from within my python program. However whenever I try to issue gdb-like commands, I get errors. The program seems to be in a REPL-sort of mode where all it's willing to do is to interpret python commands. So "list 3" doesn't work, "next" tells me that next is a
trepan reads its commands out of a command directory which will have trepan/processor/command in the path. The behavior you get will happen if that directory or the individual python commands aren't there or python can't read it.
I just ran into this myself. I'm pretty sure the problem may be using a compressed format for wheel. I'll try to correct this soon.
@kevinsullivan until I can figure out how to fix the trepan3 wheel, use easy_install. e.g.
easy_install trepan
I am sorry that trepan wheel is broken.
Thanks for this work-around. --Kevin
Ah, maybe that's what I'm running to as well?
$ trepan3k ./test.py
(/scratch/realgud/pdb/test.py:1): <module>
-> 1 a = 0
(trepan3k) next
<built-in function next>
(trepan3k) n
** NameError: name 'n' is not defined
(trepan3k) step
** NameError: name 'step' is not defined
(trepan3k) l
** NameError: name 'l' is not defined
(trepan3k) list
<class 'list'>
(trepan3k) run
** NameError: name 'run' is not defined
(trepan3k) R
** NameError: name 'R' is not defined
(trepan3k) r
** NameError: name 'r' is not defined
(trepan3k) q
** NameError: name 'q' is not defined
(trepan3k) quit
Use quit() or Ctrl-D (i.e. EOF) to exit
(trepan3k) quit()
** SystemExit: None
(trepan3k) Leaving
trepan3k: That's all, folks...
I installed using pip3. Perhaps it would be useful to show an error message and refuse to run if no commands are found?
Interestingly, trepan2 works fine (and as usual, is a brilliant piece of software)
Yes, trepan3k is broken with pip. It just doesn't install files in its wheel, and I've rewritten the installer stuff several times. I'm not even sure I know how to do install-time checks.
Rant: Ruby is just soo much simpler, easier and more flexible here. node same thing. Perl is old and creaky but it has never given me as much problem as Python, especially Python 3.
I think easy_install works as does installing from source and github.
So much to do and not enough help ;-)
Thanks for the quick reply :) I think it would be great to print the easy_install suggestion at launch if trepan3k detects a broken install.
So much to do and not enough help ;-)
:)
It is gross, but sure. Next release.
I think starting with release 0.7.1 the problem with wheel installation has been solved. But please double check.
After pip3.5 install trepan3k, I get:
pascal@MBP:~ $ trepan3k
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/bin/trepan3k", line 7, in <module>
from trepan.cli import main
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/trepan/cli.py", line 24, in <module>
from trepan import client as Mclient
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/trepan/client.py", line 27, in <module>
from trepan.version import VERSION
ImportError: No module named 'trepan.version'
pip shows I have installed 0.7.3
Note that clone from github & python3.5 setup.py install works