Project

General

Profile

« Previous | Next » 

Revision 5006

tnrs.py: tnrs_request(): Return the CSV stream directly instead of reading it into a string

View differences:

tnrs_client
11 11
sys.path.append(os.path.dirname(__file__)+"/../lib")
12 12

  
13 13
import opts
14
import streams
14 15
import tnrs
15 16

  
16 17
def main():
......
21 22
    if not taxons: raise SystemExit('Usage: '+opts.env_usage(env_names, True)
22 23
        +' '+sys.argv[0]+' taxon... >out 2>>log')
23 24
    
24
    sys.stdout.write(tnrs.tnrs_request(taxons, debug))
25
    streams.copy(tnrs.tnrs_request(taxons, debug), sys.stdout)
25 26

  
26 27
main()

Also available in: Unified diff