casa
$Rev:20696$
|
00001 # 00002 # This file was generated using xslt from its XML file 00003 # 00004 # Copyright 2009, Associated Universities Inc., Washington DC 00005 # 00006 import sys 00007 import os 00008 from casac import * 00009 import string 00010 from taskinit import casalog 00011 #from taskmanager import tm 00012 import task_find 00013 def find(matchstring=''): 00014 00015 """Find string in tasks, task names, parameter names: 00016 00017 Find string in tasks, task names, parameter names: 00018 00019 Lists the following: 00020 1) All of the task names that have the string 00021 2) All of the tasks whose contents (e.g., documentation, 00022 parameters, etc) have the string 00023 3) All of the parameter names that have the string 00024 00025 Keyword arguments: 00026 matchstring -- String to match in the documentation 00027 default: ''; example: matchstring='vis' 00028 00029 """ 00030 00031 # 00032 # The following is work around to avoid a bug with current python translation 00033 # 00034 mytmp = {} 00035 00036 mytmp['matchstring'] = matchstring 00037 pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/' 00038 trec = casac.utils().torecord(pathname+'find.xml') 00039 00040 casalog.origin('find') 00041 if trec.has_key('find') and casac.utils().verify(mytmp, trec['find']) : 00042 result = task_find.find(matchstring) 00043 00044 else : 00045 result = False 00046 return result