1

Let's say in a python project there are 2 functions func_a() and func_b(). The 2 functions may not be in the same file or same folder (but are a part of the same project). What we want to find out is all possible ways using which we can call func_b() from func_a(), without actually running the code. The answer can be something like

func_a() -> mid_func_1() -> mid_func_2() -> func_b()
func_a() -> mid_func_3() -> mid_func_4() -> mid_func_4() -> func_b()

Basically, I am asking for a tool that can do a DFS from func_a to func_b, without actually running the code.

Is it possible to do in let's say PyCharm or any other tool?

Nishant
  • 409
  • 6
  • 16
  • 1
    Does this answer your question? [Print current call stack from a method in Python code](https://stackoverflow.com/questions/1156023/print-current-call-stack-from-a-method-in-python-code) – jfaccioni Feb 15 '22 at 01:26
  • Seems like something you might be able to build using `astroid`. – Samwise Feb 15 '22 at 01:30

0 Answers0