[NeXus-code-tickets] [NeXusCode] #322: Major revision to tree.py

NeXus Data Format Library and Applications noreply at nexusformat.org
Sun Jan 22 23:08:01 GMT 2012


#322: Major revision to tree.py
------------------------------+----------------------------
  Reporter:  Ray Osborn       |      Owner:  Ray Osborn
      Type:  enhancement      |     Status:  new
  Priority:  major            |  Milestone:
 Component:  python bindings  |    Version:  4.3.0-rc1
Resolution:                   |   Keywords:  tree interface
------------------------------+----------------------------

Comment (by Ray Osborn):

 In [1806]:
 {{{
 #!CommitTicketReference repository="" revision="1806"
 Refs #322: Further improvements to make file saves work more intuitively.

 * Added three NeXus object flags, 'infile', 'saved', and 'changed' to
 record whether
 the NXobject currently exists in the file, whether its current value has
 been saved,
 and whether it has been changed. The third flag is for third-party scripts
 that need
 to keep track of when a variable has been changed. It can be reset using
 the
 'set_unchanged' method.

 * Added write methods to the NXobjects to write the object directly to the
 NeXus file.
 This required moving the context routines (__enter__ and __exit__) to the
 NXobject
 class. The use of the 'with ... as ...' syntax means that the API now
 requires
 Python 2.5.

 * Used the new 'walk' methods in conjunction with the 'write' methods to
 allow
 incremental saves (when no file name is specified) without needing to
 reload the
 entire file.

 * Debugged the reading and writing of NXlink objects to NeXus files.
 }}}

-- 
Ticket URL: <http://trac.nexusformat.org/code/ticket/322#comment:5>
NeXus Data Format Library and Applications <http://www.nexusformat.org/>
NeXus Data Format Library and Applications



More information about the NeXus-code-tickets mailing list