21 from CoolRunQuery.AtlRunQueryLib
import AtlRunQuery, AtlRunQueryOptions
22 from CoolRunQuery.AtlRunQueryParser
import ArgumentParser
26 config.setdqfolder(folder)
27 config.setdqctag(cooltag)
30 query = config.getsearchquery()
31 print (
">> Calling cmd equivalent of: ")
32 print (
"%s \"%s\"" % (config.querytool,query))
36 atlqueryarg = config.querytool +
" " + ap.ParseArgument( query )
37 (options, args) = AtlRunQueryOptions().
parse(atlqueryarg)
43 proc = multiprocessing.Process(target=AtlRunQuery, args=(options,),
44 kwargs={
'html':
"NO",
'origQuery':query,
'loglevel':0})
47 xmlfile =
'data/'+config.listname
53 sys.path.append(os.path.dirname(grlconf))
55 tmpdir = tempfile.mkdtemp()
58 rv = open(rfile,
'r').
read()
59 os.chdir(os.environ[
'TMPDIR'])
62 queue.put((rv, rfile))
89 def walker(rl, d, children):
90 for child
in children:
91 if child[-3:] ==
'.py' and child !=
'__init__.py':
92 fullpath = os.path.join(d, child)
93 classname = fullpath.replace(GRL_DIRECTORY,
'')[:-3].lstrip(
'/').
replace(
'/',
'.')
94 rl.append((fullpath, classname))
95 os.path.walk(GRL_DIRECTORY, walker, rl)