This module contains utility functions used throughout the ADMIT codebase
Method to add a new BDP ot AT to the ADMIT infrastructure
Parameters: | None |
---|---|
Returns: | None |
Method to add a new BDP ot AT to the ADMIT infrastructure
Parameters: | None |
---|---|
Returns: | None |
Get an instance of an AT or BDP class
Parameters: | typ : str
name : str
|
---|---|
Returns: | An instance of the requested class |
inspect a CASA task
( can it do tools too? No it cannot as the tools’ arguments are specified as *args and **kargs, and thus cannot be properly retrieved.) return a dictionary of {‘key’:default_val} if getargs=True, also return a list of all the [‘key’]
Examples
>>> (dict,list) = getinputs(casa_task,True)
>>> dict = getinputs(casa_task,False)
A generic method for doing retries with timeout.
Parameters: | exception : Exception
callback : function
timeout : float
timedelta : float
|
---|
Examples
>>> for retry in on_error_retry(SomeSpecificException, do_stuff):
retry()
stolen from stackoverflow.
Remove a file or directory.
The method determines if it is a file or directory and removes it appropriately.
Parameters: | item : str
|
---|---|
Returns: | None |
Remove a file
Parameters: | file : str
|
---|---|
Returns: | None |
Remove a directory
Parameters: | dir : str
|
---|---|
Returns: | None |