diff Iterative_mapping/read_s_file.py @ 0:d56631911cc1 draft

Uploaded
author tyty
date Mon, 15 Sep 2014 14:41:13 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Iterative_mapping/read_s_file.py	Mon Sep 15 14:41:13 2014 -0400
@@ -0,0 +1,22 @@
+#!/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;
+
+