Ignore:
Timestamp:
Feb 9, 2011 2:04:24 AM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
c83a5af
Parents:
8240eab
Message:

working on save state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant_state.py

    r68d48fa r75fbd17  
    22""" 
    33 
    4 import time 
     4#import time 
    55import os 
    66import sys 
     
    252252        """ 
    253253        from xml.dom.minidom import getDOMImplementation 
     254        import time 
    254255        timestamp = time.time() 
    255256        # Check whether we have to write a standalone XML file 
     
    319320        for name, value_list in self.bookmark_list.iteritems(): 
    320321            element = newdoc.createElement('mark_'+ str(name)) 
    321             _,date,state,comp_state = value_list 
     322            time,date,state,comp_state = value_list 
    322323            time_element = newdoc.createElement('time') 
    323324            time_element.appendChild(newdoc.createTextNode(str(value_list[0]))) 
     
    643644        ## CanSAS format flag 
    644645        self.cansas = cansas 
     646        self.state = None 
    645647 
    646648    def read(self, path): 
     
    742744        elif len(output) == 1: 
    743745            # Call back to post the new state 
    744  
    745             self.call_back(state=output[0].meta_data['invstate'], 
    746                            datainfo = output[0]) 
     746            self.state = output[0].meta_data['invstate'] 
     747            #self.call_back(state=output[0].meta_data['invstate'], 
     748            #               datainfo = output[0]) 
    747749            return output[0] 
    748750        else: 
    749751            return output                 
    750752     
     753    def get_state(self): 
     754        return self.state 
    751755     
    752756    def write(self, filename, datainfo=None, invstate=None): 
Note: See TracChangeset for help on using the changeset viewer.