#!/usr/bin/python import os, sys, string try: hei_isms = open(sys.argv[1], 'r') except IndexError: print 'usage: *py kegg_hei_ism_file' raise SystemExit() #resf = open('kegg_gs_ah_substrates.ism', 'w') os.system('touch kegg_gs_ah_substrates.ism') for line in hei_isms.readlines(): db_code = string.split(line)[1] os.system('extract_mols_per_title.py '+db_code+' ORIGINAL_MOLS/a4_kegg_012506.ism >> kegg_gs_ah_substrates.ism')