Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/tablerow.py: 56%
34 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 18:48 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 18:48 +0000
1##################### generated by xml-casa (v2) from tablerow.xml ##################
2##################### 94ee20623ed1b02d54a5c72a1fc176c4 ##############################
3from __future__ import absolute_import
4from .__casac__.tablerow import tablerow as _tablerow
6from .errors import create_error_string
7from .typecheck import CasaValidator as _validator
8_pc = _validator( )
9from .coercetype import coerce as _coerce
12class tablerow:
13 _info_group_ = """table"""
14 _info_desc_ = """Access table rows from casa6"""
15 ### self, table=None, columnnames=[ ], exclude=False
16 def __init__(self, table=None, columnnames=[ ], exclude=False, *args, **kwargs):
17 """
18 """
19 schema = {'table': {'type': 'ctableTool', 'nullable': True}, 'columnnames': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'exclude': {'type': 'cBool'}}
20 doc = {'table': table, 'columnnames': columnnames, 'exclude': exclude}
21 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
22 self._swigobj = kwargs.get('swig_object',None)
23 if self._swigobj is None:
24 self._swigobj = _tablerow(_pc.document['table']._swigobj if hasattr(_pc.document['table'],'_swigobj') else _pc.document['table'], _pc.document['columnnames'], _pc.document['exclude'])
26 def _iswritable(self):
27 """check to see if row can be modified
29 """
30 return self._swigobj._iswritable()
32 def iswritable(self):
33 """check to see if row can be modified
35 """
36 return self._swigobj.iswritable()
38 def _get(self, rownr):
39 """get a single row specified by rownr
41 """
42 return self._swigobj._get(rownr)
44 def get(self, rownr):
45 """get a single row specified by rownr
47 """
48 return self._swigobj.get(rownr)
50 def _put(self, rownr, value, matchingfields=True):
51 """put a single row specified by rownr
53 """
54 return self._swigobj._put(rownr, value, matchingfields)
56 def put(self, rownr, value, matchingfields=True):
57 """put a single row specified by rownr
59 """
60 return self._swigobj.put(rownr, value, matchingfields)
62 def __len__(self):
63 """return the number of available rows for use in subscription
65 """
66 return self._swigobj.__len__()
68 def __getitem__(self, rownr=None):
69 """get one row from the referenced table used in subscription
71 """
72 return self._swigobj.__getitem__(rownr)
74 def done(self):
75 """Release the table resources. After this call, the tablerow object will no longer
76 be useful.
78 """
79 return self._swigobj.done()