thirdparty/python-graph/examples/read.py
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 29 Nov 2008 00:12:47 +0000
changeset 606 65d35584ee31
parent 594 06c2228e39cb
permissions -rw-r--r--
Make forms generic Currently only Sponsor uses the new generic forms, as such this makes the form code more complex. The other forms, however, can be converted in a similar way, which will result in a lot of code reduction. Patch by: Sverre Rabbelier

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