thirdparty/python-graph/examples/read.py
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 29 Nov 2008 18:30:58 +0000
changeset 611 2ec30182e5f1
parent 594 06c2228e39cb
permissions -rw-r--r--
Move parameter construction into a seperate module This is part of an effort to make base.py less bloated and have it's methods be more cohesive. 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()