thirdparty/python-graph/examples/read.py
author Sverre Rabbelier <srabbelier@gmail.com>
Fri, 28 Nov 2008 22:48:41 +0000
changeset 601 988f8a8cd6de
parent 594 06c2228e39cb
permissions -rw-r--r--
Added a cleaning module This module is the start of a (hopefully more generic) set of cleaning functions that can be used in the GAE forms. 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()