An open API service indexing awesome lists of open source software.

https://github.com/likianta/pycallchain

Assign a python project and its launch file path, pycallchain will describe the call chains/graph by analysing static python files.
https://github.com/likianta/pycallchain

Last synced: 6 months ago
JSON representation

Assign a python project and its launch file path, pycallchain will describe the call chains/graph by analysing static python files.

Awesome Lists containing this project

README

          

# pycallchain | Python 调用链分析工具

[TOC]

# 使用方法

pass

------------------------------------------------

# 注意事项

本程序不支持处理以下特殊情况.

**case 1: global 变量**

```python

def aaa():
print('aaa')
global a
a = bbb

def bbb():
print('bbb')

if __name__ == '__main__':
aaa()
a() # <- 这里的 `a()` 将无法被识别到.

```

**case 2: eval 函数**

```python

def aaa():
print('aaa')

eval('aaa()') # <- 这里的 `aaa()` 将无法被识别到.

```

**case 3: 抽象引用**

```python
from random import randint

def aaa():
pass

def bbb():
pass

adict = {0: aaa, 1: bbb}
rnd = randint(0, 1)
method = adict.get(rnd)() # <- 这里的函数调用事件无法被识别到.

```

**case 4: 可变长度参数 (`*args`, `**kwargs`)**

```python
def aaa(*data):
print(data[0]()) # <- data[0] 无法被关联到 bbb 函数.

def bbb():
pass

aaa(bbb)

```