Mercurial > repos > greg > gene_family_classifier
comparison gene_family_classifier.py @ 114:1f357ae51fc4 draft
Uploaded
author | greg |
---|---|
date | Mon, 27 Feb 2017 14:56:37 -0500 |
parents | f517eb8b08de |
children | 713719f9210a |
comparison
equal
deleted
inserted
replaced
113:f517eb8b08de | 114:1f357ae51fc4 |
---|---|
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><h3>%s</h3></head>\n' % title) | 88 fh.write('<html><head><h3>%s</h3></head>\n' % title) |
89 fh.write('<body><p/><table cellpadding="2">\n') | 89 fh.write('<body><p/><table cellpadding="2">\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 sorted(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: |
95 size = 'unknown' | 95 size = 'unknown' |
96 link = '<a href="%s" type="text/plain">%s</a>\n' % (fname, fname) | 96 link = '<a href="%s" type="text/plain">%s</a>\n' % (fname, fname) |