python - How to find out what function I am calling -


i calling function this:

classifier = naivebayesclassifier.train(training_set)

and debug code inside train() function. problem if add print statements or pdb calls nothing changes.

i importing this:

from nltk.classify.naivebayes import naivebayesclassifier

but if change in nltk/classify/naivebayes.py nothing happens. can delete content of file , still have working output. suppose function calling somewhere else, cannot find it.

is there way check function call going? quite confused.

step in function using pdb. use pdb.set_trace() before calling train method.

something this

import pdb; pdb.set_trace() classifier = naivebayesclassifier.train(training_set)

when debug. stop @ line calling train method. press s step in function. take inside train function. there can debug normally.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -