Open asl97 opened 8 years ago
Importing anything that hasn't been imported before (ie: not in sys.modules, eg: the html module*) seem to add a whole lot of nodes.
sys.modules
html
I had to manually whitelist names for it to produce what I expected.
Manually whitelisting is troublesome to say the least.
* on my system, it wasn't imported when I start a python shell
empty1.py
import empty2 def hello(): pass empty2.hello() hello()
empty2.py
def hello(): pass
pycallgraph graphviz -- /tmp/junk/empty1.py:
pycallgraph graphviz -- /tmp/junk/empty1.py
pycallgraph -i '__main__' -i 'hello' -i '<module>' -i 'empty2*' graphviz -- /tmp/junk/empty1.py
Same for me
-e/--exclude option doesn't work at all for me. I still see these unknown/unnamed nodes (CentOS 7)
-e/--exclude
Importing anything that hasn't been imported before (ie: not in
sys.modules
, eg: thehtml
module*) seem to add a whole lot of nodes.I had to manually whitelist names for it to produce what I expected.
Manually whitelisting is troublesome to say the least.
* on my system, it wasn't imported when I start a python shell
empty1.py
empty2.py
pycallgraph graphviz -- /tmp/junk/empty1.py
:pycallgraph -i '__main__' -i 'hello' -i '<module>' -i 'empty2*' graphviz -- /tmp/junk/empty1.py