[prev in list] [next in list] [prev in thread] [next in thread]
List: relax-commits
Subject: r11505 - /1.3/data/__init__.py
From: edward () domain ! hid
Date: 2010-08-12 17:27:53
Message-ID: E1OjbZJ-0007ai-Li () domain ! hid
[Download RAW message or body]
Author: bugman
Date: Thu Aug 12 19:27:53 2010
New Revision: 11505
URL: http://svn.gna.org/viewcvs/relax?rev=11505&view=rev
Log:
Objects placed into the relax data store structure are now stored in the XML save \
file.
They are also restored again with state.load().
Modified:
1.3/data/__init__.py
Modified: 1.3/data/__init__.py
URL: http://svn.gna.org/viewcvs/relax/1.3/data/__init__.py?rev=11505&r1=11504&r2=11505&view=diff
==============================================================================
--- 1.3/data/__init__.py (original)
+++ 1.3/data/__init__.py Thu Aug 12 19:27:53 2010
@@ -36,6 +36,7 @@
from pipe_container import PipeContainer
import generic_fns
from relax_errors import RelaxError, RelaxPipeError, RelaxNoPipeError
+from relax_xml import fill_object_contents, xml_to_object
from version import version
@@ -238,6 +239,9 @@
# Get the relax version of the XML file.
relax_version = str(relax_node.getAttribute('version'))
+ # Recreate all the data store data structures.
+ xml_to_object(relax_node, self, blacklist=['pipe'])
+
# Get the pipe nodes.
pipe_nodes = relax_node.getElementsByTagName('pipe')
@@ -329,6 +333,9 @@
top_element.setAttribute('version', version)
top_element.setAttribute('time', asctime())
+ # Add all simple python objects within the PipeContainer to the pipe \
element. + fill_object_contents(xmldoc, top_element, object=self, \
blacklist=list(self.__class__.__dict__.keys() + dict.__dict__.keys())) +
# Loop over the pipes.
for pipe in pipes:
# Create the pipe XML element and add it to the top level XML element.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic