首页 > 解决方案 > Python : How to easily track the module/function definition in big package

问题描述

I'm new in coding. Let say i got a big python package contains many files and folder structures (contains many module). If i open any random file and found custom functions/modules and want to know what their jobs and purposes. For simple example i found this :

value = grabData(var)

i want to track this grabdata() , what the definition is or where it's located etc. But sometimes this kind of functions is located on other files (via import). What is the easiest way to track them. Tracking backward using 'import' statement seems not efficient. Any tips ?

标签: pythonmodule

解决方案


Consider using a Python integrated development environment in your development workflow. IDEs often include features such as Go To Declaration or Find Usages that are accessible simply by right-clicking on the symbol you are looking for.

For example, here is how to Find Usages of a symbol in the PyCharm IDE: link to PyCharm docs.

You can find a list of Python IDEs to install on the Python community Wiki.


推荐阅读