2. What is it?
● Apache License Version 2.0
● A tool to help you trace code efficiently.
● It record the program how to run and save
the result to file with json format.
● You can use `python -m call_seq.browser
output.json` to read the program how to
run.
● https://github.com/ya790206/call_seq
3. How to install it?
pip install call_seq
pip install pyside pyqode.core pyqode.python
it’s not simple thing if you use pip to
install pyside. Make sure you have
installed qt dev package.
4. How to use it?
if __name__ == '__main__':
map = CallSeq()
map.set_trace()
test()
map.unset_trace()
map.dump_to_file('output.json')
5. How to use it?
@trace('output.json')
def main():
test()
6. How to use it?
if __name__ == '__main__':
with CallSeq(name='output.json'):
test()
7. How to use it?
$ python -m call_seq.core output.json demo1.
py
8. How to use the file the tool
generate?
$ python -m call_seq.browser output.json
9. Source code is displayed
here.
function `default_hook` is
defined here. The line is
marked with gray.
We can know that the
function `__init__` call
`default_hook` and store
result in `self.hooks`
We can know that
`default_hook` return in line
24. The value of return is a
dict with key `response`.
We can know the function get
no arguments. It’s clear.