Commits

sammyrulez committed 7b6a57b

refactored

  • Participants
  • Parent commits 0e94a95

Comments (0)

Files changed (2)

File kutil/__init__.py

Empty file added.

File kutil/dry.py

+class BaseFileDifferentialObject():
+
+	def _load_file(self , file_path):
+		return open(file_path,'r')
+		
+	def eval_row(self,row):
+		pass
+	def is_row_data(self,row):
+		pass
+		
+	def eval_spread(self, file_path):
+		file = self._load_file(file_path)
+		flag_value = None
+		min_diff = None
+		for line in file:
+			row = line.split()
+			if self.is_row_data(row):
+				diff_dict = self.eval_row(row)
+				if not min_diff or min_diff > diff_dict[1]:
+						min_diff = diff_dict[1]
+						flag_value =  diff_dict[0]
+		
+		return flag_value
+			
+
+