def do_search(self,args): try: arglist = re.split(r' +',args) mz = float(arglist[0]) rt = int(arglist[1]) outf = arglist[2] except IndexError: print 'usage: search [mz] [rt] [outfile]' return with open(outf,'w') as fout: r = new_search.search(get_engine(),mz,rt,self.ion_mode,self.config) for line in self._dump_config(): print >>fout, line for line in new_search.results_as_csv(r): print >>fout, line
def do_search(self, args): try: arglist = re.split(r' +', args) mz = float(arglist[0]) rt = int(arglist[1]) outf = arglist[2] except IndexError: print 'usage: search [mz] [rt] [outfile]' return with open(outf, 'w') as fout: r = new_search.search(get_engine(), mz, rt, self.ion_mode, self.config) for line in self._dump_config(): print >> fout, line for line in new_search.results_as_csv(r): print >> fout, line
def waldo(): q = request.form.get('query', '') results = new_search.search(q) #results = ["hi", "hi", "hi", "hi", "hi"] return render_template("waldo.html", results = results, query = string.capwords(q) )