[Level 1] How to trace the source code more efficient.

If you want to trace python call stack, you could get call sequence by using call_seq module. You could download call_seq from pypi website. https://pypi.python.org/pypi/call_seq/0.0.1 After you download it, you could prepare the python script like following.
python from call_seq import CallSeq
trail = CallSeq()
trail.set_trace()
# the code you want to trace.
trail.unset_trace()
trail.dump_to_file('output.json')
After you create the output json file, then you could use browser module of call_seq to get visualization of call sequence.
$ python -m call_seq.browser ./output.json

Wish this helps.

regards,
Stanley Huang

Comments

Popular posts from this blog

[Level 3] Install Memcached Storage Engine for MySQL on CentOS 5.4

[Level 1] How to install Jython on Ubuntu.

[Level 2] Solaris 10 Technical Conference ( 2009/10/25,11/13,12/4 ) -- Basic SMF hands-on lab