Reputation: 63
Given the novice that I am, I have an extremely naive question, apologies for that
I modified certain core .py files by adding print
. Now it's printing a bunch of lines and I'm unable to trace what file I added the print
statement. How can I find out what line / file the print
is occurring, so that i can go back and remove it? It happens when code executes import sklearn
.
I tried debugging and going back to certain files I had modified and searching for print
statement, but not able to trace back.
Upvotes: 3
Views: 197
Reputation: 18816
Reinstalling sklearn
is probably the simplest and easiest option.
Otherwise you can try using pdb
to find the troublesome line(s).
python -m pdb myscript.py
Simply mash s
(per-function) and n
(line-by-line search) to taste until you find the undesirable statements.
Upvotes: 1
Reputation: 437
OPTIONS:
In general its a BAD idea to go in and edit the core Python files unless you REALLY know what you are doing.
Upvotes: 1