Changeset 1222
- Timestamp:
- 08/04/09 01:14:55 (3 years ago)
- Location:
- trunk/bindings/python
- Files:
-
- 2 edited
-
nxs/napi.py (modified) (3 diffs)
-
nxstest.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bindings/python/nxs/napi.py
r1221 r1222 577 577 """ 578 578 #print "closegroup" 579 if self._indata: 580 raise NeXusError, "Close data before group at %s"%(self._loc()) 579 581 status = nxlib.nxiclosegroup_(self.handle) 580 582 if status == ERROR: 581 raise NeXusError, "Could not close group at %s"%( name,self._loc())583 raise NeXusError, "Could not close group at %s"%(self._loc()) 582 584 self._path.pop() 583 585 … … 809 811 """ 810 812 #print "opendata",self._loc(),name 811 status = nxlib.nxiopendata_(self.handle, name) 813 if self._indata: 814 status = ERROR 815 else: 816 status = nxlib.nxiopendata_(self.handle, name) 812 817 if status == ERROR: 813 818 raise ValueError, "Could not open data %s: %s"%(name, self._loc()) … … 830 835 if status == ERROR: 831 836 raise NeXusError,\ 832 "Could not close data at %s"%( name,self._loc())837 "Could not close data at %s"%(self._loc()) 833 838 self._path.pop() 834 839 self._indata = False -
trunk/bindings/python/nxstest.py
r1221 r1222 132 132 # .. demonstrate extensible data 133 133 file.makedata('flush_data','int32',[nxs.UNLIMITED]) 134 file.opendata('flush_data') 134 135 for i in range(7): 135 file.opendata('flush_data')136 136 file.putslab(i,[i],[1]) 137 file.flush()138 # Oops... why isn't there a closedata()?137 file.closedata() 138 file.flush() 139 139 file.closegroup() 140 140
Note: See TracChangeset
for help on using the changeset viewer.
