Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/utils.py: 60%
89 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 utils.xml #####################
2##################### caa044079eebdde0ec7526fb745cc64d ##############################
3from __future__ import absolute_import
4from .__casac__.utils import utils as _utils
6from .errors import create_error_string
7from .typecheck import CasaValidator as _validator
8_pc = _validator( )
9from .coercetype import coerce as _coerce
12class utils:
13 _info_group_ = """utils"""
14 _info_desc_ = """Utility component, verified, xml translator"""
15 ### self
16 def __init__(self, *args, **kwargs):
17 """
18 """
19 self._swigobj = kwargs.get('swig_object',None)
20 if self._swigobj is None:
21 self._swigobj = _utils()
23 def getrc(self, rcvar=''):
24 """
25 """
26 return self._swigobj.getrc(rcvar)
28 def removetable(self, tablenames=[ ]):
29 """
30 """
31 return self._swigobj.removetable(tablenames)
33 def tableinfo(self, tablename=''):
34 """Currently this only returns the pid of the process locking the table (lockpid), if the lock
35 is permanent (lockperm), and the status (lockstatus) -- 'not in use', 'open', 'read', 'write',
36 or 'unknown'. However, the hope is that this will eventually return a complete description of
37 the table.
39 """
40 return self._swigobj.tableinfo(tablename)
42 def lockedtables(self):
43 """
44 """
45 return self._swigobj.lockedtables()
47 def hostinfo(self):
48 """
49 """
50 return self._swigobj.hostinfo()
52 def c_exception(self):
53 """Returns detailed information from the last CASA C++ exception (i.e., AipsError). The
54 exception message and the stack trace (mangled; use the shell's c++filt to demangle)
55 from the last CASA C++ exception. The information is from the last one generated
56 and may not represent an exception from the last action; c_exception_clear can be
57 used to remove stale information. The information's exception might also
58 have been caught in the C++ code and not have been translated into a Python-level
59 exception.
61 """
62 return self._swigobj.c_exception()
64 def c_exception_clear(self):
65 """Clears the CASA C++ exception information. This allows the user to be sure that
66 information retrieved using c_exception is not from an exception in the
67 distant past.
69 """
70 return self._swigobj.c_exception_clear()
72 def _trigger_segfault(self, faultType=int(0)):
73 """This triggers a segfault for testing the crash reporter. Obviously you
74 shouldn't call this unless that's what you want. It's in here for
75 development/debugging purposes and ought to be removed before you see this.
77 """
78 return self._swigobj._trigger_segfault(faultType)
80 def tryit(self, input):
81 """test variant convesion
82 """
83 return self._swigobj.tryit(input)
85 def maxint(self):
86 """maximum number an C++ int can hold
87 """
88 return self._swigobj.maxint()
90 def minint(self):
91 """minimum number an C++ int can hold
92 """
93 return self._swigobj.minint()
95 def maxlong(self):
96 """maximum number an C++ long can hold
97 """
98 return self._swigobj.maxlong()
100 def minlong(self):
101 """minimum number an C++ long can hold
102 """
103 return self._swigobj.minlong()
105 def initialize(self, python_path, distro_data_path, default_path, nogui, agg, pipeline, cachedir):
106 """returns true if initalization was performed; returns false if initialization was already done
107 """
108 return self._swigobj.initialize(python_path, distro_data_path, default_path, nogui, agg, pipeline, cachedir)
110 def rundata(self):
111 """path to the measures data. This function is deprecated measurespath should be used instead.
112 """
113 return self._swigobj.rundata()
115 def measurespath(self):
116 """path to the measures data
117 """
118 return self._swigobj.measurespath()
120 def setrundata(self, path=''):
121 """Set path to the measures data. Must be called during initalization
122 before Measures module is initialized. This function is deprecated.
123 setmeasurespath should be used instead.
124 """
125 return self._swigobj.setrundata(path)
127 def setmeasurespath(self, path=''):
128 """Set path to the measures data. Must be called during initalization
129 before Measures module is initialized.
130 """
131 return self._swigobj.setmeasurespath(path)
133 def defaultpath(self):
134 """Returns the default data path. This path is used unless the user has set the current path to something else using the setpath function.
135 """
136 return self._swigobj.defaultpath()
138 def setpath(self, dirs=[ ]):
139 """Sets the data path to the specified list of directories. Returns true if all directories were added
140 returns false otherwise.
141 """
142 return self._swigobj.setpath(dirs)
144 def getpath(self):
145 """Returns the list of directories that are currently in the data path.
146 """
147 return self._swigobj.getpath()
149 def clearpath(self):
150 """Removes all directories from the data path.
151 """
152 return self._swigobj.clearpath()
154 def resolve(self, path=''):
155 """If the provided path already represents a file or a directory, it is returned. If it does not,
156 this function tries to find a complete path by matching up this partial directory with the
157 elements of the data path.
158 """
159 return self._swigobj.resolve(path)
161 def getnogui(self):
162 """Returns the value of the nogui parameter used at startup. Defaults to False.
164 """
165 return self._swigobj.getnogui()
167 def getagg(self):
168 """Returns the value of the agg parameter used at startup. Defaults to False.
170 """
171 return self._swigobj.getagg()
173 def getpipeline(self):
174 """Returns the value of the pipeline parameter used at startup. Defaults to False.
176 """
177 return self._swigobj.getpipeline()
179 def getcachedir(self):
180 """Returns the value of the cachedir parameter used at startup.
182 """
183 return self._swigobj.getcachedir()
185 def registry(self):
186 """returns record containing the URI for the CASAtools registry which can be used by other unix processes to access the registry
187 """
188 return self._swigobj.registry()
190 def services(self):
191 """returns record containing the information about the services that have been registered with CASAtools
192 """
193 return self._swigobj.services()
195 def remove_service(self, uri=''):
196 """Remove a service from the registry using the URI for the
197 service. The URI should be a string that looks something
198 like "0.0.0.0:34101". This function returns true if the
199 removal was successful. Otherwise, it returns false.
200 """
201 return self._swigobj.remove_service(uri)
203 def shutdown(self):
204 """python is shutting down cleanup anything that is outstanding
205 """
206 return self._swigobj.shutdown()
208 def getpython(self):
209 """
210 """
211 return self._swigobj.getpython()
213 def version(self):
214 """Returns a four element vector representing the version (major, minor, patch and feature).
215 """
216 return self._swigobj.version()
218 def version_variant(self):
219 """Returns the target instrument. This helps distinguish versions that otherwise may have the same version number
220 """
221 return self._swigobj.version_variant()
223 def version_desc(self):
224 """The descriptive string describes a particular packaged version. During a development
225 cycle there are different sorts of packaged distributions. For example, a development
226 version ("DEV") or a release version ("REL").
227 """
228 return self._swigobj.version_desc()
230 def version_info(self):
231 """Returns a description string that includes the version information and the descriptive string..
232 """
233 return self._swigobj.version_info()
235 def version_string(self):
236 """Returns a description string that includes the version information and the descriptive string..
237 """
238 return self._swigobj.version_string()
240 def compare_version(self, comparitor, vec):
241 """Returns a description string that includes the version information and the descriptive string..
242 """
243 return self._swigobj.compare_version(comparitor, vec)