Mercurial > repos > tyty > structurefold
view Iterative_mapping/read_s_file.py @ 119:7bb98e9296e9 draft default tip
Uploaded
author | tyty |
---|---|
date | Tue, 14 Apr 2015 14:18:40 -0400 |
parents | d56631911cc1 |
children |
line wrap: on
line source
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys def read_sp_file(in_file): f = open(in_file); result = []; for aline in f.readlines(): temp = []; tline = aline.strip(); tl = tline.split(' '); for i in range(0, len(tl)): if len(tl[i].strip())>0: temp.append(tl[i].strip()); result.append(temp); f.close(); return result;