Mercurial > repos > tyty > structurefold
comparison Iterative_mapping/read_s_file.py @ 66:d2817a631a7b draft
Uploaded
| author | tyty |
|---|---|
| date | Tue, 18 Nov 2014 16:24:04 -0500 |
| parents | d56631911cc1 |
| children |
comparison
equal
deleted
inserted
replaced
| 65:36d912d5b1ac | 66:d2817a631a7b |
|---|---|
| 1 #!/usr/bin/env python | |
| 2 # -*- coding: utf-8 -*- | |
| 3 | |
| 4 import sys | |
| 5 | |
| 6 | |
| 7 | |
| 8 def read_sp_file(in_file): | |
| 9 f = open(in_file); | |
| 10 result = []; | |
| 11 for aline in f.readlines(): | |
| 12 temp = []; | |
| 13 tline = aline.strip(); | |
| 14 tl = tline.split(' '); | |
| 15 for i in range(0, len(tl)): | |
| 16 if len(tl[i].strip())>0: | |
| 17 temp.append(tl[i].strip()); | |
| 18 result.append(temp); | |
| 19 f.close(); | |
| 20 return result; | |
| 21 | |
| 22 |
