473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

pycallgraph 0.2.0

Hi

I just released a new version of pycallgraph. It has many improvements
over 0.1.0. Here is an example of a call graph made in pycallgraph
0.2.0:
http://pycallgraph.slowchop.com/pyca.../RegExpExample

There are more examples on the web site:
http://pycallgraph.slowchop.com/

The changes are:
* Windows access denied bug fixed
* graph uses different colours depending on the number of calls made
to the function
* graph settings and look are very customisable
* exclude and include filters
* stop_trace() is not required anymore, it is called automatically by
make_graph()
* will throw an exception if there is an error from dot/neato
* removed obvious use of __main__ as the module name
* added some examples

There is no documentation yet but if you browse the source you'll be
able to figure out a lot.

Enjoy!

Gerald

Feb 10 '07 #1
4 1533
Gerald Kaszuba wrote:
Hi

I just released a new version of pycallgraph. It has many improvements
over 0.1.0. Here is an example of a call graph made in pycallgraph
0.2.0:
http://pycallgraph.slowchop.com/pyca.../RegExpExample

There are more examples on the web site:
http://pycallgraph.slowchop.com/

The changes are:
* Windows access denied bug fixed
* graph uses different colours depending on the number of calls made
to the function
* graph settings and look are very customisable
* exclude and include filters
* stop_trace() is not required anymore, it is called automatically by
make_graph()
* will throw an exception if there is an error from dot/neato
* removed obvious use of __main__ as the module name
* added some examples

There is no documentation yet but if you browse the source you'll be
able to figure out a lot.

Enjoy!

Gerald
looks very good Gerald, thanks !

My first test was terrible: a file of 800kB was created,
Trying to view it, resulted in the following:
- Paint Shop Pro told me it was not a valid PNG file,
- Mozilla crashed after 5 minutes,
- GIMP gave me a preview after half an hour ;-)

So a few suggestions:
- is there a way to limit the number of nodes ?
- "pycallgraph." nodes are "non-information"
(maybe you can find another way to place your "signature" ;-)
- how do I exclude modules/files/objects (sorry I'm still a newbie in Python)

cheers,
Stef Mientki
Feb 10 '07 #2

GeraldI just released a new version of pycallgraph. It has many
Geraldimprovements over 0.1.0.

Looks nice. Before you get too far... Is there any chance that you can
support ASCII output mode (obviously not laid out in two dimensions, just
using indentation) so the GraphViz requirement can become optional?
GraphViz has so many dependencies of its own (and many of them are
GTK-related) that the chance of me satisfying them is very small. (I'm on
Solaris and Mac, not Linux, so I don't have the benefit of a Linux distro to
solve those particular headaches for me.)

Thanks,

Skip
Feb 10 '07 #3
On Feb 10, 11:14 pm, Stef Mientki <S.Mientki-nos...@mailbox.kun.nl>
wrote:
My first test was terrible: a file of 800kB was created,
Trying to view it, resulted in the following:
- Paint Shop Pro told me it was not a valid PNG file,
- Mozilla crashed after 5 minutes,
- GIMP gave me a preview after half an hour ;-)
Impressive! :)
So a few suggestions:
- is there a way to limit the number of nodes ?
Not yet, I will have a maximum stack-depth option in the next version.
- "pycallgraph." nodes are "non-information"
(maybe you can find another way to place your "signature" ;-)
This should be fixed in the next version.
- how do I exclude modules/files/objects (sorry I'm still a newbie in Python)
Say you want to only display your own modules called 'foo' and 'bar':
import pycallgraph
pycallgraph.settings['include_module'] = ['foo', bar]
pycallgraph.start_trace()
pycallgraph.make_graph('blah.png')
>From the source there are these options for inclusion and exclusion:
'exclude_module': [],
'exclude_class': [],
'exclude_func': [],
'exclude_specific': ['stop_trace', 'make_graph'],
'include_module': [],
'include_class': [],
'include_func': [],
'include_specific': [],

"specific" means the whole name of a node, e.g.
"foo.MyBarClass.__init__"

Gerald

Feb 10 '07 #4
On Feb 11, 12:28 am, s...@pobox.com wrote:
Looks nice. Before you get too far... Is there any chance that you can
support ASCII output mode (obviously not laid out in two dimensions, just
using indentation) so the GraphViz requirement can become optional?
GraphViz has so many dependencies of its own (and many of them are
GTK-related) that the chance of me satisfying them is very small. (I'm on
Solaris and Mac, not Linux, so I don't have the benefit of a Linux distro to
solve those particular headaches for me.)
It's easy enough. I'll put it on my todo list.

Gerald

Feb 10 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gerald Kaszuba | last post by:
Hi I've just released the first version of Python Call Graph. I haven't tested it too much so don't expect it not to crash :) An example of its output is:...
1
by: Steven W. Orr | last post by:
Lots of code, calls to, calls by, inheritance, multiple tasks, etc. What do people use to figure out what's happening? TIA -- Time flies like the wind. Fruit flies like a banana. Stranger...
6
by: mh | last post by:
I'm cleaning up some old code, and want to see what orphan functions might be sitting around. Is there a static call tree analyzer for python? Many TIA! Mark -- Mark Harrison
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.