answered 8 years ago
Here is a convenient (however non efficient) way of doing it.
g=graphs.CycleGraph(4) for hp in g.subgraph_search_iterator(graphs.PathGraph(g.num_verts())): print hp
Hope this helps!