thirdparty/python-graph/examples/read.py
author Lennard de Rijk <ljvderijk@gmail.com>
Fri, 28 Nov 2008 08:24:57 +0000
changeset 600 f6abfcbff3a4
parent 594 06c2228e39cb
permissions -rw-r--r--
Apache license and __author__ added. Also added a todo for the __doc__ string. Patch by: Lennard de Rijk

#!/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()