> Ok thank you very much I'll try with that.
> But I have some design doubts, I'd like to keep the algorithm (for
> example bfs) as clean as possible, being independent from the drawing
> methods.
> And how could I make it step through algorithms without having a more
> complicated code? Maybe using threads?

Along the lines of what Marc said:

Use two graph-implementations that share the same interface regarding the
algorithms, but one will emit events to some observer for each operation on
the graph - edge/node adding/removal, attribute changing and so forth.

Thus the algorithm is kept clean, and all that you can visualize anyway is
available to you.

diez
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to