changeset 594 | 06c2228e39cb |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/thirdparty/python-graph/examples/read.py Wed Nov 26 23:56:19 2008 +0000 @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +# Copyright (c) 2007-2008 Pedro Matiello <pmatiello@gmail.com> +# License: MIT (see COPYING file) + +import sys +sys.path.append('..') +import graph + +gr = graph.graph() + +inputfile = file('graph.xml','r') +string = inputfile.read() +inputfile.close() + +gr.read(string) +print gr.write()