Index: src/sas/qtgui/MainWindow/DataManager.py
===================================================================
--- src/sas/qtgui/MainWindow/DataManager.py	(revision 7d9c83c92cef3381669815551c3850802b12abf0)
+++ src/sas/qtgui/MainWindow/DataManager.py	(revision b0b09b9740526b0b3838f642e43599409dfd8772)
@@ -24,5 +24,5 @@
 import json
 import time
-from StringIO import StringIO
+from io import StringIO
 import numpy as np
 
@@ -66,5 +66,5 @@
         _str += "No of states  is %s \n" % str(len(self.stored_data))
         n_count = 0
-        for  value in self.stored_data.values():
+        for  value in list(self.stored_data.values()):
             n_count += 1
             _str += "State No %s \n"  % str(n_count)
@@ -146,5 +146,5 @@
         receive a list of
         """
-        for id, data in data_list.iteritems():
+        for id, data in data_list.items():
             if id  in self.stored_data:
                 msg = "Data manager already stores %s" % str(data.name)
@@ -162,10 +162,10 @@
         """
         """
-        if prev_data.id not in self.stored_data.keys():
+        if prev_data.id not in list(self.stored_data.keys()):
             return None, {}
         data_state = self.stored_data[prev_data.id]
         self.stored_data[new_data.id]  = data_state.clone()
         self.stored_data[new_data.id].data = new_data
-        if prev_data.id in self.stored_data.keys():
+        if prev_data.id in list(self.stored_data.keys()):
             del self.stored_data[prev_data.id]
         return prev_data.id, {new_data.id: self.stored_data[new_data.id]}
@@ -177,5 +177,5 @@
         if data_id is None and theory is not None:
             uid = theory.id
-        if uid in self.stored_data.keys():
+        if uid in list(self.stored_data.keys()):
              data_state = self.stored_data[uid]
         else:
@@ -207,5 +207,5 @@
                 if search_id == d_id:
                     _selected_data[search_id] = data
-                if search_id in theory_list.keys():
+                if search_id in list(theory_list.keys()):
                      _selected_theory_list[search_id] = theory_list[search_id]
 
@@ -216,5 +216,5 @@
         """
         """
-        return self.freeze_theory(self.stored_data.keys(), theory_id)
+        return self.freeze_theory(list(self.stored_data.keys()), theory_id)
 
     def freeze_theory(self, data_id, theory_id):
@@ -227,5 +227,5 @@
                 theory_list = data_state.get_theory()
                 for t_id in theory_id:
-                    if t_id in theory_list.keys():
+                    if t_id in list(theory_list.keys()):
                         theory_data, theory_state = theory_list[t_id]
                         new_theory = copy.deepcopy(theory_data)
@@ -247,5 +247,5 @@
         """
         for d_id in data_id:
-            if d_id in self.stored_data.keys():
+            if d_id in list(self.stored_data.keys()):
                 data_state = self.stored_data[d_id]
                 if data_state.data.name in self.data_name_dict:
@@ -265,5 +265,5 @@
                 data_state = self.stored_data[d_id]
                 theory_list = data_state.get_theory()
-                if theory_id in theory_list.keys():
+                if theory_id in list(theory_list.keys()):
                     del theory_list[theory_id]
         #del pure theory
@@ -284,5 +284,5 @@
         _selected_data = {}
         for selected_name in name_list:
-            for id, data_state in self.stored_data.iteritems():
+            for id, data_state in self.stored_data.items():
                 if data_state.data.name == selected_name:
                     _selected_data[id] = data_state.data
@@ -294,5 +294,5 @@
         """
         for selected_name in name_list:
-            for id, data_state in self.stored_data.iteritems():
+            for id, data_state in self.stored_data.items():
                 if data_state.data.name == selected_name:
                     del self.stored_data[id]
@@ -303,5 +303,5 @@
             # Take the copy of current, possibly shorter stored_data dict
             stored_data = copy.deepcopy(self.stored_data)
-            for idx in stored_data.keys():
+            for idx in list(stored_data.keys()):
                 if str(selected_name) in str(idx):
                     del self.stored_data[idx]
@@ -313,5 +313,5 @@
         _selected_data_state = {}
         for id in data_id:
-            if id in self.stored_data.keys():
+            if id in list(self.stored_data.keys()):
                 _selected_data_state[id] = self.stored_data[id]
         return _selected_data_state
@@ -396,5 +396,5 @@
             class Empty(object):
                 def __init__(self):
-                    for key, value in data.iteritems():
+                    for key, value in data.items():
                         setattr(self, key, generate(value, level))
 
@@ -451,5 +451,5 @@
                     # if dictionary doesn't have __type__ then it is assumed to be just an ordinary dictionary
                     o = {}
-                    for key, value in data.iteritems():
+                    for key, value in data.items():
                         o[key] = generate(value, level)
                     return o
@@ -463,5 +463,5 @@
 
         new_stored_data = {}
-        for id, data in json.load(fp).iteritems():
+        for id, data in json.load(fp).items():
             try:
                 new_stored_data[id] = generate(data, 0)
