Using SNAKES plugins
Monday, January 18, 2010
One of the important features of SNAKES is its capability to extend the basic model with plugins. In this post, we see how to load plugins.
Loading a plugin essentially requires a call to snakes.plugins.load. For instance, let's load plugin gv that allows to draw Petri nets (using GraphViz):
import snakes.plugins snakes.plugins.load("gv", "snakes.nets", "mynets")
net = mynets.PetriNet("Drawable net") from mynets import *
import snakes.plugins snakes.plugins.load(["gv", "ops"], "snakes.nets", "mynets")
Post a comment