Mercurial > repos > greg > gene_family_classifier
comparison gene_family_classifier.py @ 112:9e688af74aae draft
Uploaded
author | greg |
---|---|
date | Mon, 27 Feb 2017 14:49:41 -0500 |
parents | 5f77ac9fbb46 |
children | f517eb8b08de |
comparison
equal
deleted
inserted
replaced
111:5f77ac9fbb46 | 112:9e688af74aae |
---|---|
83 sys.exit(1) | 83 sys.exit(1) |
84 | 84 |
85 | 85 |
86 def write_html_output(output, title, dir): | 86 def write_html_output(output, title, dir): |
87 with open(output, 'w') as fh: | 87 with open(output, 'w') as fh: |
88 fh.write('<html><head><title>%s</title></head>\n' % title) | 88 fh.write('<html><head><h2>%s</h2></head>\n' % title) |
89 fh.write('<body><p/><table cellpadding="5" cellspacing="5">\n') | 89 fh.write('<body><p/><table cellpadding="5">\n') |
90 fh.write('<tr><th>Size</th><th>Name</th></tr>\n') | 90 fh.write('<tr><th>Size</th><th>Name</th></tr>\n') |
91 for fname in os.listdir(dir): | 91 for fname in os.listdir(dir): |
92 try: | 92 try: |
93 size = str(os.path.getsize(os.path.join(dir, fname))) | 93 size = str(os.path.getsize(os.path.join(dir, fname))) |
94 except: | 94 except: |