It has just recently been moved to trunk.
If you check out the TracePyCSP branch instead, you will have examples
of how to produce a trace for visualization. See:
http://code.google.com/p/pycsp/source/browse/branches/TracePyCSP/examples/Sieve.py
# Import traceable copies of PyCSP constructs
from pycsp.common.trace import *
# Create necessary trace process
TraceInit("output.trace", stdout=True)
# Shutdown trace process
TraceQuit()
the output.trace file can then be visualized with the PlayTrace.py
tool in tools.
> python tools/PlayTrace.py examples/Sieve.trace
Suggested improvements for visualizing traces in PyCSP:
* Record time spent blocking / executing. Use this in the
visualization (a colorscheme perhaps?)
* Support for moving backwards in time.
* Show the actions on a channel. Does the process block on multiple
channels using AltSelect?
* Large process networks are hard to visualize with Graphviz, perhaps
a 3D layout could be applied with success.
Cheers,
Rune
Try changing
class TracedChannel():
to
class TracedChannel:
Did that fix the problem?
- Rune
> P = subprocess.Popen(args=('which', cmd), stdin=None,
Support for calling the external commands to invoke graphviz have not
been implemented for windows.
It should be easy to fix and you are most welcome to produce a patch. :-)
Also, the same goes for running the playtrace tool with Python 2.4.
Our goal is that we want everything to work for Python 2.4+ and Linux,
Mac and Windows. Later Python 3.x will be added to the list.
Sorry for the inconvenience.
- Rune