I have many python packages written by my colleagues, and I want to write a tool to check which third packages they rely on.
Like this
#it is my package, need to check,call it example.py
and the tool should work as follows
result = tool(example.py) #this result should be a dict like this structure #{"third_party_function":["my_function",]} #Means "my_function" relies on "third_party_function"
I have no idea how to do this, all I can think of for implementing this tool is reading a line of a Python file as one line as a line and using regex to compare it. Could you give me some advice?
If you do not know what I mean, comment on your question, I will fix it as soon as possible. Thanks!
Fudun source share