Index: run.py
===================================================================
--- run.py	(revision bbd97e5cc51780c7e00fb5c22b4c92799a7c0216)
+++ run.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -8,5 +8,8 @@
 Usage:
 
-./run.py [args]
+./run.py [(module|script) args...]
+
+Without arguments run.py runs sasview.  With arguments, run.py will run
+the given module or script.
 """
 
@@ -122,8 +125,5 @@
 
 if __name__ == "__main__":
-    # start sasview
-    #import multiprocessing
-    #multiprocessing.freeze_support()
     prepare()
-    from sans.sansview.sansview import SasView
-    SasView()
+    from sans.sansview.sansview import run
+    run()
Index: sansview/sansview.py
===================================================================
--- sansview/sansview.py	(revision e2271c590a75c4a37335432df42e8a22964c061f)
+++ sansview/sansview.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -36,10 +36,5 @@
 PLUGIN_MODEL_DIR = 'plugin_models'
 APP_NAME = 'SasView'
-def run():
-    sys.path.append(os.path.join("..","..",".."))
-    from multiprocessing import freeze_support
-    freeze_support()
-    sasview = SasView()
-        
+
 class SasViewApp(gui_manager.ViewApp):
     """
@@ -113,13 +108,22 @@
         self.gui.clean_plugin_models(PLUGIN_MODEL_DIR)
         # Start the main loop
-        self.gui.MainLoop()  
-       
+        self.gui.MainLoop()
 
 
-if __name__ == "__main__": 
+def run():
     from multiprocessing import freeze_support
     freeze_support()
-    #Process(target=SasView).start()
-    sasview = SasView()
+    if len(sys.argv) > 1:
+        thing_to_run = sys.argv[1]
+        sys.argv = sys.argv[1:]
+        import runpy
+        if os.path.exists(thing_to_run):
+            runpy.run_path(thing_to_run)
+        else:
+            runpy.run_module(thing_to_run)
+    else:
+        SasView()
 
-   
+if __name__ == "__main__":
+    run()
+
Index: sansview/setup_exe.py
===================================================================
--- sansview/setup_exe.py	(revision 27b7accfe21e1b3456e646ee01adff844993eae3)
+++ sansview/setup_exe.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -319,4 +319,5 @@
 'reportlab.platypus',
 ])
+packages.append('IPython')
 includes = ['site']
 
Index: setup.py
===================================================================
--- setup.py	(revision 968aa6e55c1878932278d78744f9b0adccd25c0e)
+++ setup.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -69,5 +69,5 @@
     
     
-enable_openmp = True                    
+enable_openmp = False
 
 if sys.platform =='darwin':
Index: src/sans/fit/AbstractFitEngine.py
===================================================================
--- src/sans/fit/AbstractFitEngine.py	(revision 6c007022258cff8efb5208e90301244c22e30170)
+++ src/sans/fit/AbstractFitEngine.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -3,136 +3,99 @@
 #import logging
 import sys
+import math
 import numpy
-import math
-import park
+
 from sans.dataloader.data_info import Data1D
 from sans.dataloader.data_info import Data2D
-_SMALLVALUE = 1.0e-10    
-    
-class SansParameter(park.Parameter):
-    """
-    SANS model parameters for use in the PARK fitting service.
-    The parameter attribute value is redirected to the underlying
-    parameter value in the SANS model.
-    """
-    def __init__(self, name, model, data):
-        """
-            :param name: the name of the model parameter
-            :param model: the sans model to wrap as a park model
-        """
-        park.Parameter.__init__(self, name)
-        self._model, self._name = model, name
-        self.data = data
-        self.model = model
-        #set the value for the parameter of the given name
-        self.set(model.getParam(name))
-         
-    def _getvalue(self):
-        """
-        override the _getvalue of park parameter
-        
-        :return value the parameter associates with self.name
-        
-        """
-        return self._model.getParam(self.name)
-    
-    def _setvalue(self, value):
-        """
-        override the _setvalue pf park parameter
-        
-        :param value: the value to set on a given parameter
-        
-        """
-        self._model.setParam(self.name, value)
-        
-    value = property(_getvalue, _setvalue)
-    
-    def _getrange(self):
-        """
-        Override _getrange of park parameter
-        return the range of parameter
-        """
-        #if not  self.name in self._model.getDispParamList():
-        lo, hi = self._model.details[self.name][1:3]
-        if lo is None: lo = -numpy.inf
-        if hi is None: hi = numpy.inf
-        if lo > hi:
-            raise ValueError, "wrong fit range for parameters"
-        
-        return lo, hi
-    
-    def get_name(self):
-        """
-        """
-        return self._getname()
-    
-    def _setrange(self, r):
-        """
-        override _setrange of park parameter
-        
-        :param r: the value of the range to set
-        
-        """
-        self._model.details[self.name][1:3] = r
-    range = property(_getrange, _setrange)
-    
-    
-class Model(park.Model):
-    """
-    PARK wrapper for SANS models.
+_SMALLVALUE = 1.0e-10
+
+# Note: duplicated from park
+class FitHandler(object):
+    """
+    Abstract interface for fit thread handler.
+
+    The methods in this class are called by the optimizer as the fit
+    progresses.
+
+    Note that it is up to the optimizer to call the fit handler correctly,
+    reporting all status changes and maintaining the 'done' flag.
+    """
+    done = False
+    """True when the fit job is complete"""
+    result = None
+    """The current best result of the fit"""
+
+    def improvement(self):
+        """
+        Called when a result is observed which is better than previous
+        results from the fit.
+
+        result is a FitResult object, with parameters, #calls and fitness.
+        """
+    def error(self, msg):
+        """
+        Model had an error; print traceback
+        """
+    def progress(self, current, expected):
+        """
+        Called each cycle of the fit, reporting the current and the
+        expected amount of work.   The meaning of these values is
+        optimizer dependent, but they can be converted into a percent
+        complete using (100*current)//expected.
+
+        Progress is updated each iteration of the fit, whatever that
+        means for the particular optimization algorithm.  It is called
+        after any calls to improvement for the iteration so that the
+        update handler can control I/O bandwidth by suppressing
+        intermediate improvements until the fit is complete.
+        """
+    def finalize(self):
+        """
+        Fit is complete; best results are reported
+        """
+    def abort(self):
+        """
+        Fit was aborted.
+        """
+
+class Model:
+    """
+    Fit wrapper for SANS models.
     """
     def __init__(self, sans_model, sans_data=None, **kw):
         """
         :param sans_model: the sans model to wrap using park interface
-        
-        """
-        park.Model.__init__(self, **kw)
+
+        """
         self.model = sans_model
         self.name = sans_model.name
         self.data = sans_data
-        #list of parameters names
-        self.sansp = sans_model.getParamList()
-        #list of park parameter
-        self.parkp = [SansParameter(p, sans_model, sans_data) for p in self.sansp]
-        #list of parameter set
-        self.parameterset = park.ParameterSet(sans_model.name, pars=self.parkp)
-        self.pars = []
-  
+
     def get_params(self, fitparams):
         """
         return a list of value of paramter to fit
-        
+
         :param fitparams: list of paramaters name to fit
-        
-        """
-        list_params = []
-        self.pars = []
-        self.pars = fitparams
-        for item in fitparams:
-            for element in self.parkp:
-                if element.name == str(item):
-                    list_params.append(element.value)
-        return list_params
-    
+
+        """
+        return [self.model.getParam(k) for k in fitparams]
+
     def set_params(self, paramlist, params):
         """
         Set value for parameters to fit
-        
+
         :param params: list of value for parameters to fit
-        
-        """
-        try:
-            for i in range(len(self.parkp)):
-                for j in range(len(paramlist)):
-                    if self.parkp[i].name == paramlist[j]:
-                        self.parkp[i].value = params[j]
-                        self.model.setParam(self.parkp[i].name, params[j])
-        except:
-            raise
-  
+
+        """
+        for k,v in zip(paramlist, params):
+            self.model.setParam(k,v)
+
+    def set(self, **kw):
+        self.set_params(*zip(*kw.items()))
+
     def eval(self, x):
         """
             Override eval method of park model.
-        
+
             :param x: the x value used to compute a function
         """
@@ -141,5 +104,5 @@
         except:
             raise
-        
+
     def eval_derivs(self, x, pars=[]):
         """
@@ -154,7 +117,9 @@
         instead of calling eval.
         """
-        return []
-
-    
+        raise NotImplementedError('no derivatives available')
+
+    def __call__(self, x):
+        return self.eval(x)
+
 class FitData1D(Data1D):
     """
@@ -185,4 +150,5 @@
         """
         Data1D.__init__(self, x=x, y=y, dx=dx, dy=dy)
+        self.num_points = len(x)
         self.sans_data = data
         self.smearer = smearer
@@ -298,4 +264,5 @@
         """
         self.res_err_image = []
+        self.num_points = data.size
         self.idx = []
         self.qmin = None
@@ -409,136 +376,5 @@
 
 
-class SansAssembly:
-    """
-    Sans Assembly class a class wrapper to be call in optimizer.leastsq method
-    """
-    def __init__(self, paramlist, model=None, data=None, fitresult=None,
-                 handler=None, curr_thread=None, msg_q=None):
-        """
-        :param Model: the model wrapper fro sans -model
-        :param Data: the data wrapper for sans data
-        
-        """
-        self.model = model
-        self.data = data
-        self.paramlist = paramlist
-        self.msg_q = msg_q
-        self.curr_thread = curr_thread
-        self.handler = handler
-        self.fitresult = fitresult
-        self.res = []
-        self.true_res = []
-        self.func_name = "Functor"
-        self.theory = None
-        
-    def chisq(self):
-        """
-        Calculates chi^2
-        
-        :param params: list of parameter values
-        
-        :return: chi^2
-        
-        """
-        total = 0
-        for item in self.true_res:
-            total += item * item
-        if len(self.true_res) == 0:
-            return None
-        return total / len(self.true_res)
-    
-    def __call__(self, params):
-        """
-            Compute residuals
-            :param params: value of parameters to fit
-        """
-        #import thread
-        self.model.set_params(self.paramlist, params)
-        #print "params", params
-        self.true_res, theory = self.data.residuals(self.model.eval)
-        self.theory = copy.deepcopy(theory)
-        # check parameters range
-        if self.check_param_range():
-            # if the param value is outside of the bound
-            # just silent return res = inf
-            return self.res
-        self.res = self.true_res
-        
-        if self.fitresult is not None:
-            self.fitresult.set_model(model=self.model)
-            self.fitresult.residuals = self.true_res
-            self.fitresult.iterations += 1
-            self.fitresult.theory = theory
-           
-            #fitness = self.chisq(params=params)
-            fitness = self.chisq()
-            self.fitresult.pvec = params
-            self.fitresult.set_fitness(fitness=fitness)
-            if self.msg_q is not None:
-                self.msg_q.put(self.fitresult)
-                
-            if self.handler is not None:
-                self.handler.set_result(result=self.fitresult)
-                self.handler.update_fit()
-
-            if self.curr_thread != None:
-                try:
-                    self.curr_thread.isquit()
-                except:
-                    #msg = "Fitting: Terminated...       Note: Forcing to stop "
-                    #msg += "fitting may cause a 'Functor error message' "
-                    #msg += "being recorded in the log file....."
-                    #self.handler.stop(msg)
-                    raise
-         
-        return self.res
-    
-    def check_param_range(self):
-        """
-        Check the lower and upper bound of the parameter value
-        and set res to the inf if the value is outside of the
-        range
-        :limitation: the initial values must be within range.
-        """
-
-        #time.sleep(0.01)
-        is_outofbound = False
-        # loop through the fit parameters
-        for p in self.model.parameterset:
-            param_name = p.get_name()
-            if param_name in self.paramlist:
-                
-                # if the range was defined, check the range
-                if numpy.isfinite(p.range[0]):
-                    if p.value == 0:
-                        # This value works on Scipy
-                        # Do not change numbers below
-                        value = _SMALLVALUE
-                    else:
-                        value = p.value
-                    # For leastsq, it needs a bit step back from the boundary
-                    val = p.range[0] - value * _SMALLVALUE
-                    if p.value < val:
-                        self.res *= 1e+6
-                        
-                        is_outofbound = True
-                        break
-                if numpy.isfinite(p.range[1]):
-                    # This value works on Scipy
-                    # Do not change numbers below
-                    if p.value == 0:
-                        value = _SMALLVALUE
-                    else:
-                        value = p.value
-                    # For leastsq, it needs a bit step back from the boundary
-                    val = p.range[1] + value * _SMALLVALUE
-                    if p.value > val:
-                        self.res *= 1e+6
-                        is_outofbound = True
-                        break
-
-        return is_outofbound
-    
-    
+
 class FitEngine:
     def __init__(self):
@@ -754,9 +590,4 @@
     
     
-IS_MAC = True
-if sys.platform.count("win32") > 0:
-    IS_MAC = False
-
-
 class FResult(object):
     """
@@ -777,5 +608,4 @@
         self.index = []
         self.parameters = None
-        self.is_mac = IS_MAC
         self.model = model
         self.data = data
@@ -803,18 +633,12 @@
         if self.pvec == None and self.model is None and self.param_list is None:
             return "No results"
-        n = len(self.model.parameterset)
-        
-        result_param = zip(xrange(n), self.model.parameterset)
-        msg1 = ["[Iteration #: %s ]" % self.iterations]
-        msg3 = ["=== goodness of fit: %s ===" % (str(self.fitness))]
-        if not self.is_mac:
-            msg2 = ["P%-3d  %s......|.....%s" % \
-                (p[0], p[1], p[1].value)\
-                  for p in result_param if p[1].name in self.param_list]
-            msg = msg1 + msg3 + msg2
-        else:
-            msg = msg1 + msg3
-        msg = "\n".join(msg)
-        return msg
+
+        pars = enumerate(self.model.model.getParamList())
+        msg1 = "[Iteration #: %s ]" % self.iterations
+        msg3 = "=== goodness of fit: %s ===" % (str(self.fitness))
+        msg2 = ["P%-3d  %s......|.....%s" % (i, v, self.model.model.getParam(v))
+                for i,v in pars if v in self.param_list]
+        msg = [msg1, msg3] + msg2
+        return "\n".join(msg)
     
     def print_summary(self):
Index: src/sans/fit/BumpsFitting.py
===================================================================
--- src/sans/fit/BumpsFitting.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
+++ src/sans/fit/BumpsFitting.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -0,0 +1,285 @@
+"""
+BumpsFitting module runs the bumps optimizer.
+"""
+import sys
+import copy
+
+import numpy
+
+from bumps import fitters
+from bumps.mapper import SerialMapper
+
+from sans.fit.AbstractFitEngine import FitEngine
+from sans.fit.AbstractFitEngine import FResult
+
+class SansAssembly(object):
+    """
+    Sans Assembly class a class wrapper to be call in optimizer.leastsq method
+    """
+    def __init__(self, paramlist, model=None, data=None, fitresult=None,
+                 handler=None, curr_thread=None, msg_q=None):
+        """
+        :param Model: the model wrapper fro sans -model
+        :param Data: the data wrapper for sans data
+        """
+        self.model = model
+        self.data = data
+        self.paramlist = paramlist
+        self.msg_q = msg_q
+        self.curr_thread = curr_thread
+        self.handler = handler
+        self.fitresult = fitresult
+        self.res = []
+        self.func_name = "Functor"
+        self.theory = None
+        self.name = "Fill in proper name!"
+
+    @property
+    def dof(self):
+        return self.data.num_points - len(self.paramlist)
+
+    def summarize(self):
+        return "summarize"
+
+    def nllf(self, pvec=None):
+        residuals = self.residuals(pvec)
+        return 0.5*numpy.sum(residuals**2)
+
+    def setp(self, params):
+        self.model.set_params(self.paramlist, params)
+
+    def getp(self):
+        return numpy.asarray(self.model.get_params(self.paramlist))
+
+    def bounds(self):
+        return numpy.array([self._getrange(p) for p in self.paramlist]).T
+
+    def labels(self):
+        return self.paramlist
+
+    def _getrange(self, p):
+        """
+        Override _getrange of park parameter
+        return the range of parameter
+        """
+        lo, hi = self.model.model.details[p][1:3]
+        if lo is None: lo = -numpy.inf
+        if hi is None: hi = numpy.inf
+        return lo, hi
+
+    def randomize(self, n):
+        pvec = self.getp()
+        # since randn is symmetric and random, doesn't matter
+        # point value is negative.
+        # TODO: throw in bounds checking!
+        return numpy.random.randn(n, len(self.paramlist))*pvec + pvec
+
+    def chisq(self):
+        """
+        Calculates chi^2
+
+        :param params: list of parameter values
+
+        :return: chi^2
+
+        """
+        total = 0
+        for item in self.res:
+            total += item * item
+        if len(self.res) == 0:
+            return None
+        return total / len(self.res)
+
+    def residuals(self, params=None):
+        """
+        Compute residuals
+        :param params: value of parameters to fit
+        """
+        if params is not None: self.setp(params)
+        #import thread
+        #print "params", params
+        self.res, self.theory = self.data.residuals(self.model.eval)
+
+        if self.fitresult is not None:
+            self.fitresult.set_model(model=self.model)
+            self.fitresult.residuals = self.res+0
+            self.fitresult.iterations += 1
+            self.fitresult.theory = self.theory+0
+
+            #fitness = self.chisq(params=params)
+            fitness = self.chisq()
+            self.fitresult.pvec = params
+            self.fitresult.set_fitness(fitness=fitness)
+            if self.msg_q is not None:
+                self.msg_q.put(self.fitresult)
+
+            if self.handler is not None:
+                self.handler.set_result(result=self.fitresult)
+                self.handler.update_fit()
+
+            if self.curr_thread != None:
+                try:
+                    self.curr_thread.isquit()
+                except:
+                    #msg = "Fitting: Terminated...       Note: Forcing to stop "
+                    #msg += "fitting may cause a 'Functor error message' "
+                    #msg += "being recorded in the log file....."
+                    #self.handler.stop(msg)
+                    raise
+
+        return self.res
+    __call__ = residuals
+
+    def check_param_range(self):
+        """
+        Check the lower and upper bound of the parameter value
+        and set res to the inf if the value is outside of the
+        range
+        :limitation: the initial values must be within range.
+        """
+
+        #time.sleep(0.01)
+        is_outofbound = False
+        # loop through the fit parameters
+        model = self.model.model
+        for p in self.paramlist:
+            value = model.getParam(p)
+            low,high = model.details[p][1:3]
+            if low is not None and numpy.isfinite(low):
+                if p.value == 0:
+                    # This value works on Scipy
+                    # Do not change numbers below
+                    value = _SMALLVALUE
+                # For leastsq, it needs a bit step back from the boundary
+                val = low - value * _SMALLVALUE
+                if value < val:
+                    self.res *= 1e+6
+                    is_outofbound = True
+                    break
+            if high is not None and numpy.isfinite(high):
+                # This value works on Scipy
+                # Do not change numbers below
+                if value == 0:
+                    value = _SMALLVALUE
+                # For leastsq, it needs a bit step back from the boundary
+                val = high + value * _SMALLVALUE
+                if value > val:
+                    self.res *= 1e+6
+                    is_outofbound = True
+                    break
+
+        return is_outofbound
+
+class BumpsFit(FitEngine):
+    """
+    Fit a model using bumps.
+    """
+    def __init__(self):
+        """
+        Creates a dictionary (self.fit_arrange_dict={})of FitArrange elements
+        with Uid as keys
+        """
+        FitEngine.__init__(self)
+        self.curr_thread = None
+
+    def fit(self, msg_q=None,
+            q=None, handler=None, curr_thread=None,
+            ftol=1.49012e-8, reset_flag=False):
+        """
+        """
+        fitproblem = []
+        for fproblem in self.fit_arrange_dict.itervalues():
+            if fproblem.get_to_fit() == 1:
+                fitproblem.append(fproblem)
+        if len(fitproblem) > 1 :
+            msg = "Bumps can't fit more than a single fit problem at a time."
+            raise RuntimeError, msg
+        elif len(fitproblem) == 0 :
+            raise RuntimeError, "No Assembly scheduled for Scipy fitting."
+        model = fitproblem[0].get_model()
+        if reset_flag:
+            # reset the initial value; useful for batch
+            for name in fitproblem[0].pars:
+                ind = fitproblem[0].pars.index(name)
+                model.setParam(name, fitproblem[0].vals[ind])
+        listdata = []
+        listdata = fitproblem[0].get_data()
+        # Concatenate dList set (contains one or more data)before fitting
+        data = listdata
+
+        self.curr_thread = curr_thread
+        ftol = ftol
+
+        result = FResult(model=model, data=data, param_list=self.param_list)
+        result.pars = fitproblem[0].pars
+        result.fitter_id = self.fitter_id
+        result.index = data.idx
+        if handler is not None:
+            handler.set_result(result=result)
+        functor = SansAssembly(paramlist=self.param_list,
+                               model=model,
+                               data=data,
+                               handler=handler,
+                               fitresult=result,
+                               curr_thread=curr_thread,
+                               msg_q=msg_q)
+        try:
+            run_bumps(functor, result)
+        except:
+            if hasattr(sys, 'last_type') and sys.last_type == KeyboardInterrupt:
+                if handler is not None:
+                    msg = "Fitting: Terminated!!!"
+                    handler.stop(msg)
+                    raise KeyboardInterrupt, msg
+            else:
+                raise
+
+        if handler is not None:
+            handler.set_result(result=result)
+            handler.update_fit(last=True)
+        if q is not None:
+            q.put(result)
+            return q
+        #if success < 1 or success > 5:
+        #    result.fitness = None
+        return [result]
+
+def run_bumps(problem, result):
+    fitopts = fitters.FIT_OPTIONS[fitters.FIT_DEFAULT]
+    fitdriver = fitters.FitDriver(fitopts.fitclass, problem=problem, 
+        abort_test=lambda: False, **fitopts.options)
+    mapper = SerialMapper 
+    fitdriver.mapper = mapper.start_mapper(problem, None)
+    try:
+        best, fbest = fitdriver.fit()
+    except:
+        import traceback; traceback.print_exc()
+        raise
+    mapper.stop_mapper(fitdriver.mapper)
+    fitdriver.show()
+    #fitdriver.plot()
+    result.fitness = fbest * 2. / len(result.pars) 
+    result.stderr  = numpy.ones(len(result.pars))
+    result.pvec = best 
+    result.success = True
+    result.theory = problem.theory
+
+def run_scipy(model, result):
+    # This import must be here; otherwise it will be confused when more
+    # than one thread exist.
+    from scipy import optimize
+
+    out, cov_x, _, mesg, success = optimize.leastsq(functor,
+                                                    model.get_params(self.param_list),
+                                                    ftol=ftol,
+                                                    full_output=1)
+    if cov_x is not None and numpy.isfinite(cov_x).all():
+        stderr = numpy.sqrt(numpy.diag(cov_x))
+    else:
+        stderr = []
+    result.fitness = functor.chisqr()
+    result.stderr  = stderr
+    result.pvec = out
+    result.success = success
+    result.theory = functor.theory
+
Index: src/sans/fit/Fitting.py
===================================================================
--- src/sans/fit/Fitting.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/fit/Fitting.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -8,5 +8,11 @@
 from sans.fit.ScipyFitting import ScipyFit
 from sans.fit.ParkFitting import ParkFit
+from sans.fit.BumpsFitting import BumpsFit
 
+ENGINES={
+    'scipy': ScipyFit,
+    'park': ParkFit,
+    'bumps': BumpsFit,
+}
 
 class Fit(object):
@@ -59,10 +65,8 @@
              
         """
-        if word == "scipy":
-            self._engine = ScipyFit()
-        elif word == "park":
-            self._engine = ParkFit()
-        else:
-            raise ValueError, "enter the keyword scipy or park"
+        try:
+            self._engine = ENGINES[word]()
+        except KeyError, exc:
+            raise KeyError("fit engine should be one of scipy, park or bumps")
 
     def fit(self, msg_q=None, q=None, handler=None, 
Index: src/sans/fit/Loader.py
===================================================================
--- src/sans/fit/Loader.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/fit/Loader.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -8,6 +8,6 @@
     This class is loading values from given file or value giving by the user
     """
-    
     def __init__(self, x=None, y=None, dx=None, dy=None):
+        raise NotImplementedError("a code search shows that this code is not active, and you are not seeing this message")
         # variable to store loaded values
         self.x = x
Index: src/sans/fit/ParkFitting.py
===================================================================
--- src/sans/fit/ParkFitting.py	(revision 9d6d5bac0acbf70af7fa2fc5a5951c6d7a8c9f91)
+++ src/sans/fit/ParkFitting.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -24,5 +24,152 @@
 from sans.fit.AbstractFitEngine import FitEngine
 from sans.fit.AbstractFitEngine import FResult
-  
+
+class SansParameter(park.Parameter):
+    """
+    SANS model parameters for use in the PARK fitting service.
+    The parameter attribute value is redirected to the underlying
+    parameter value in the SANS model.
+    """
+    def __init__(self, name, model, data):
+        """
+            :param name: the name of the model parameter
+            :param model: the sans model to wrap as a park model
+        """
+        park.Parameter.__init__(self, name)
+        self._model, self._name = model, name
+        self.data = data
+        self.model = model
+        #set the value for the parameter of the given name
+        self.set(model.getParam(name))
+
+    def _getvalue(self):
+        """
+        override the _getvalue of park parameter
+
+        :return value the parameter associates with self.name
+
+        """
+        return self._model.getParam(self.name)
+
+    def _setvalue(self, value):
+        """
+        override the _setvalue pf park parameter
+
+        :param value: the value to set on a given parameter
+
+        """
+        self._model.setParam(self.name, value)
+
+    value = property(_getvalue, _setvalue)
+
+    def _getrange(self):
+        """
+        Override _getrange of park parameter
+        return the range of parameter
+        """
+        #if not  self.name in self._model.getDispParamList():
+        lo, hi = self._model.details[self.name][1:3]
+        if lo is None: lo = -numpy.inf
+        if hi is None: hi = numpy.inf
+        if lo > hi:
+            raise ValueError, "wrong fit range for parameters"
+
+        return lo, hi
+
+    def get_name(self):
+        """
+        """
+        return self._getname()
+
+    def _setrange(self, r):
+        """
+        override _setrange of park parameter
+
+        :param r: the value of the range to set
+
+        """
+        self._model.details[self.name][1:3] = r
+    range = property(_getrange, _setrange)
+
+
+class Model(park.Model):
+    """
+    PARK wrapper for SANS models.
+    """
+    def __init__(self, sans_model, sans_data=None, **kw):
+        """
+        :param sans_model: the sans model to wrap using park interface
+
+        """
+        park.Model.__init__(self, **kw)
+        self.model = sans_model
+        self.name = sans_model.name
+        self.data = sans_data
+        #list of parameters names
+        self.sansp = sans_model.getParamList()
+        #list of park parameter
+        self.parkp = [SansParameter(p, sans_model, sans_data) for p in self.sansp]
+        #list of parameter set
+        self.parameterset = park.ParameterSet(sans_model.name, pars=self.parkp)
+        self.pars = []
+
+    def get_params(self, fitparams):
+        """
+        return a list of value of paramter to fit
+
+        :param fitparams: list of paramaters name to fit
+
+        """
+        list_params = []
+        self.pars = []
+        self.pars = fitparams
+        for item in fitparams:
+            for element in self.parkp:
+                if element.name == str(item):
+                    list_params.append(element.value)
+        return list_params
+
+    def set_params(self, paramlist, params):
+        """
+        Set value for parameters to fit
+
+        :param params: list of value for parameters to fit
+
+        """
+        try:
+            for i in range(len(self.parkp)):
+                for j in range(len(paramlist)):
+                    if self.parkp[i].name == paramlist[j]:
+                        self.parkp[i].value = params[j]
+                        self.model.setParam(self.parkp[i].name, params[j])
+        except:
+            raise
+
+    def eval(self, x):
+        """
+            Override eval method of park model.
+
+            :param x: the x value used to compute a function
+        """
+        try:
+            return self.model.evalDistribution(x)
+        except:
+            raise
+
+    def eval_derivs(self, x, pars=[]):
+        """
+        Evaluate the model and derivatives wrt pars at x.
+
+        pars is a list of the names of the parameters for which derivatives
+        are desired.
+
+        This method needs to be specialized in the model to evaluate the
+        model function.  Alternatively, the model can implement is own
+        version of residuals which calculates the residuals directly
+        instead of calling eval.
+        """
+        return []
+
+
 class SansFitResult(fitresult.FitResult):
     def __init__(self, *args, **kwrds):
@@ -383,5 +530,5 @@
     def fit(self, msg_q=None, 
             q=None, handler=None, curr_thread=None, 
-                                        ftol=1.49012e-8, reset_flag=False):
+            ftol=1.49012e-8, reset_flag=False):
         """
         Performs fit with park.fit module.It can  perform fit with one model
Index: src/sans/fit/ScipyFitting.py
===================================================================
--- src/sans/fit/ScipyFitting.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/fit/ScipyFitting.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -1,4 +1,2 @@
-
-
 """
 ScipyFitting module contains FitArrange , ScipyFit,
@@ -6,14 +4,136 @@
 simple fit with scipy optimizer.
 """
+import sys
+import copy
 
 import numpy 
-import sys
-
 
 from sans.fit.AbstractFitEngine import FitEngine
-from sans.fit.AbstractFitEngine import SansAssembly
-from sans.fit.AbstractFitEngine import FitAbort
-from sans.fit.AbstractFitEngine import Model
-from sans.fit.AbstractFitEngine import FResult 
+from sans.fit.AbstractFitEngine import FResult
+
+class SansAssembly:
+    """
+    Sans Assembly class a class wrapper to be call in optimizer.leastsq method
+    """
+    def __init__(self, paramlist, model=None, data=None, fitresult=None,
+                 handler=None, curr_thread=None, msg_q=None):
+        """
+        :param Model: the model wrapper fro sans -model
+        :param Data: the data wrapper for sans data
+
+        """
+        self.model = model
+        self.data = data
+        self.paramlist = paramlist
+        self.msg_q = msg_q
+        self.curr_thread = curr_thread
+        self.handler = handler
+        self.fitresult = fitresult
+        self.res = []
+        self.true_res = []
+        self.func_name = "Functor"
+        self.theory = None
+
+    def chisq(self):
+        """
+        Calculates chi^2
+
+        :param params: list of parameter values
+
+        :return: chi^2
+
+        """
+        total = 0
+        for item in self.true_res:
+            total += item * item
+        if len(self.true_res) == 0:
+            return None
+        return total / len(self.true_res)
+
+    def __call__(self, params):
+        """
+            Compute residuals
+            :param params: value of parameters to fit
+        """
+        #import thread
+        self.model.set_params(self.paramlist, params)
+        #print "params", params
+        self.true_res, theory = self.data.residuals(self.model.eval)
+        self.theory = copy.deepcopy(theory)
+        # check parameters range
+        if self.check_param_range():
+            # if the param value is outside of the bound
+            # just silent return res = inf
+            return self.res
+        self.res = self.true_res
+
+        if self.fitresult is not None:
+            self.fitresult.set_model(model=self.model)
+            self.fitresult.residuals = self.true_res
+            self.fitresult.iterations += 1
+            self.fitresult.theory = theory
+
+            #fitness = self.chisq(params=params)
+            fitness = self.chisq()
+            self.fitresult.pvec = params
+            self.fitresult.set_fitness(fitness=fitness)
+            if self.msg_q is not None:
+                self.msg_q.put(self.fitresult)
+
+            if self.handler is not None:
+                self.handler.set_result(result=self.fitresult)
+                self.handler.update_fit()
+
+            if self.curr_thread != None:
+                try:
+                    self.curr_thread.isquit()
+                except:
+                    #msg = "Fitting: Terminated...       Note: Forcing to stop "
+                    #msg += "fitting may cause a 'Functor error message' "
+                    #msg += "being recorded in the log file....."
+                    #self.handler.stop(msg)
+                    raise
+
+        return self.res
+
+    def check_param_range(self):
+        """
+        Check the lower and upper bound of the parameter value
+        and set res to the inf if the value is outside of the
+        range
+        :limitation: the initial values must be within range.
+        """
+
+        #time.sleep(0.01)
+        is_outofbound = False
+        # loop through the fit parameters
+        model = self.model.model
+        for p in self.paramlist:
+            value = model.getParam(p)
+            low,high = model.details[p][1:3]
+            if low is not None and numpy.isfinite(low):
+                if p.value == 0:
+                    # This value works on Scipy
+                    # Do not change numbers below
+                    value = _SMALLVALUE
+                # For leastsq, it needs a bit step back from the boundary
+                val = low - value * _SMALLVALUE
+                if value < val:
+                    self.res *= 1e+6
+                    is_outofbound = True
+                    break
+            if high is not None and numpy.isfinite(high):
+                # This value works on Scipy
+                # Do not change numbers below
+                if value == 0:
+                    value = _SMALLVALUE
+                # For leastsq, it needs a bit step back from the boundary
+                val = high + value * _SMALLVALUE
+                if value > val:
+                    self.res *= 1e+6
+                    is_outofbound = True
+                    break
+
+        return is_outofbound
 
 class ScipyFit(FitEngine):
@@ -50,6 +170,4 @@
         """
         FitEngine.__init__(self)
-        self.fit_arrange_dict = {}
-        self.param_list = []
         self.curr_thread = None
     #def fit(self, *args, **kw):
@@ -68,8 +186,6 @@
             msg = "Scipy can't fit more than a single fit problem at a time."
             raise RuntimeError, msg
-            return
-        elif len(fitproblem) == 0 : 
+        elif len(fitproblem) == 0 :
             raise RuntimeError, "No Assembly scheduled for Scipy fitting."
-            return
         model = fitproblem[0].get_model()
         if reset_flag:
@@ -87,5 +203,5 @@
         
         # Check the initial value if it is within range
-        self._check_param_range(model)
+        _check_param_range(model.model, self.param_list)
         
         result = FResult(model=model, data=data, param_list=self.param_list)
@@ -94,4 +210,11 @@
         if handler is not None:
             handler.set_result(result=result)
+        functor = SansAssembly(paramlist=self.param_list,
+                               model=model,
+                               data=data,
+                               handler=handler,
+                               fitresult=result,
+                               curr_thread=curr_thread,
+                               msg_q=msg_q)
         try:
             # This import must be here; otherwise it will be confused when more
@@ -99,15 +222,8 @@
             from scipy import optimize
             
-            functor = SansAssembly(paramlist=self.param_list, 
-                                   model=model, 
-                                   data=data,
-                                    handler=handler,
-                                    fitresult=result,
-                                     curr_thread=curr_thread,
-                                     msg_q=msg_q)
             out, cov_x, _, mesg, success = optimize.leastsq(functor,
                                             model.get_params(self.param_list),
-                                                    ftol=ftol,
-                                                    full_output=1)
+                                            ftol=ftol,
+                                            full_output=1)
         except:
             if hasattr(sys, 'last_type') and sys.last_type == KeyboardInterrupt:
@@ -142,58 +258,35 @@
 
         
-    def _check_param_range(self, model):
-        """
-        Check parameter range and set the initial value inside 
-        if it is out of range.
-        
-        : model: park model object
-        """
-        is_outofbound = False
-        # loop through parameterset
-        for p in model.parameterset:        
-            param_name = p.get_name()
-            # proceed only if the parameter name is in the list of fitting
-            if param_name in self.param_list:
-                # if the range was defined, check the range
-                if numpy.isfinite(p.range[0]):
-                    if p.value <= p.range[0]: 
-                        # 10 % backing up from the border if not zero
-                        # for Scipy engine to work properly.
-                        shift = self._get_zero_shift(p.range[0])
-                        new_value = p.range[0] + shift
-                        p.value =  new_value
-                        is_outofbound = True
-                if numpy.isfinite(p.range[1]):
-                    if p.value >= p.range[1]:
-                        shift = self._get_zero_shift(p.range[1])
-                        # 10 % backing up from the border if not zero
-                        # for Scipy engine to work properly.
-                        new_value = p.range[1] - shift
-                        # Check one more time if the new value goes below
-                        # the low bound, If so, re-evaluate the value 
-                        # with the mean of the range.
-                        if numpy.isfinite(p.range[0]):
-                            if new_value < p.range[0]:
-                                new_value = (p.range[0] + p.range[1]) / 2.0
-                        # Todo: 
-                        # Need to think about when both min and max are same.
-                        p.value =  new_value
-                        is_outofbound = True
-                        
-        return is_outofbound
-    
-    def _get_zero_shift(self, range):
-        """
-        Get 10% shift of the param value = 0 based on the range value
-        
-        : param range: min or max value of the bounds
-        """
-        if range == 0:
-            shift = 0.1
-        else:
-            shift = 0.1 * range
-            
-        return shift
-    
+def _check_param_range(model, param_list):
+    """
+    Check parameter range and set the initial value inside
+    if it is out of range.
+
+    : model: park model object
+    """
+    # loop through parameterset
+    for p in param_list:
+        value = model.getParam(p)
+        low,high = model.details[p][1:3]
+        # if the range was defined, check the range
+        if low is not None and value <= low:
+            value = low + _get_zero_shift(low)
+        if high is not None and value > high:
+            value = high - _get_zero_shift(high)
+            # Check one more time if the new value goes below
+            # the low bound, If so, re-evaluate the value
+            # with the mean of the range.
+            if low is not None and value < low:
+                value = 0.5 * (low+high)
+        model.setParam(p, value)
+
+def _get_zero_shift(limit):
+    """
+    Get 10% shift of the param value = 0 based on the range value
+
+    : param range: min or max value of the bounds
+    """
+    return 0.1 (limit if limit != 0.0 else 1.0)
+
     
 #def profile(fn, *args, **kw):
Index: src/sans/fit/__init__.py
===================================================================
--- src/sans/fit/__init__.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/fit/__init__.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -0,0 +1,1 @@
+from .AbstractFitEngine import FitHandler
Index: src/sans/perspectives/fitting/basepage.py
===================================================================
--- src/sans/perspectives/fitting/basepage.py	(revision 27b7accfe21e1b3456e646ee01adff844993eae3)
+++ src/sans/perspectives/fitting/basepage.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -808,6 +808,6 @@
             infor = "warning"
         else:
-            msg = "Error was occured "
-            msg += ": No valid parameter values to paste from the clipboard..."
+            msg = "Error occured: "
+            msg += "No valid parameter values to paste from the clipboard..."
             infor = "error"
             wx.PostEvent(self._manager.parent,
@@ -2149,10 +2149,10 @@
                 else:
                     tcrtl.SetBackgroundColour("pink")
-                    msg = "Model Error:wrong value entered: %s" % sys.exc_value
+                    msg = "Model Error: wrong value entered: %s" % sys.exc_value
                     wx.PostEvent(self.parent, StatusEvent(status=msg))
                     return
             except:
                 tcrtl.SetBackgroundColour("pink")
-                msg = "Model Error:wrong value entered: %s" % sys.exc_value
+                msg = "Model Error: wrong value entered: %s" % sys.exc_value
                 wx.PostEvent(self.parent, StatusEvent(status=msg))
                 return
@@ -2165,9 +2165,9 @@
                         #is_modified = True
                 else:
-                    msg = "Cannot Plot :No npts in that Qrange!!!  "
+                    msg = "Cannot plot: No points in Q range!!!  "
                     wx.PostEvent(self.parent, StatusEvent(status=msg))
         else:
             tcrtl.SetBackgroundColour("pink")
-            msg = "Model Error:wrong value entered!!!"
+            msg = "Model Error: wrong value entered!!!"
             wx.PostEvent(self.parent, StatusEvent(status=msg))
         self.save_current_state()
@@ -2206,10 +2206,10 @@
                 else:
                     tcrtl.SetBackgroundColour("pink")
-                    msg = "Model Error:wrong value entered: %s" % sys.exc_value
+                    msg = "Model Error: wrong value entered: %s" % sys.exc_value
                     wx.PostEvent(self._manager.parent, StatusEvent(status=msg))
                     return
             except:
                 tcrtl.SetBackgroundColour("pink")
-                msg = "Model Error:wrong value entered: %s" % sys.exc_value
+                msg = "Model Error: wrong value entered: %s" % sys.exc_value
                 wx.PostEvent(self._manager.parent, StatusEvent(status=msg))
                 return
@@ -2222,9 +2222,9 @@
                         is_modified = True
                 else:
-                    msg = "Cannot Plot :No npts in that Qrange!!!  "
+                    msg = "Cannot Plot: No points in Q range!!!  "
                     wx.PostEvent(self._manager.parent, StatusEvent(status=msg))
         else:
             tcrtl.SetBackgroundColour("pink")
-            msg = "Model Error:wrong value entered!!!"
+            msg = "Model Error: wrong value entered!!!"
             wx.PostEvent(self._manager.parent, StatusEvent(status=msg))
         self.save_current_state()
@@ -2397,6 +2397,6 @@
                 self.qmax.SetBackgroundColour("pink")
                 self.qmax.Refresh()
-                msg = "Npts of Data Error :"
-                msg += "No or too little npts of %s." % data.name
+                msg = "Data Error: "
+                msg += "Too few points in %s." % data.name
                 wx.PostEvent(self._manager.parent, StatusEvent(status=msg))
                 self.fitrange = False
@@ -2432,6 +2432,6 @@
                 self.qmax.SetBackgroundColour("pink")
                 self.qmax.Refresh()
-                msg = "Npts of Data Error :"
-                msg += "No or too little npts of %s." % data.name
+                msg = "Data Error: "
+                msg += "Too few points in %s." % data.name
                 wx.PostEvent(self._manager.parent, StatusEvent(status=msg))
                 self.fitrange = False
@@ -2484,5 +2484,5 @@
                                            
                         except:
-                            msg = "Wrong Fit parameter range entered "
+                            msg = "Wrong fit parameter range entered"
                             wx.PostEvent(self._manager.parent,
                                          StatusEvent(status=msg))
Index: src/sans/perspectives/fitting/console.py
===================================================================
--- src/sans/perspectives/fitting/console.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/perspectives/fitting/console.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -5,6 +5,5 @@
 import time
 import wx
-import park
-from park.fitresult import FitHandler
+from sans.fit import FitHandler
 
 class ConsoleUpdate(FitHandler):
Index: src/sans/perspectives/fitting/fitting.py
===================================================================
--- src/sans/perspectives/fitting/fitting.py	(revision 767514afc7aa3ac5ba01c3f093481cdb65966863)
+++ src/sans/perspectives/fitting/fitting.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -111,4 +111,5 @@
         self.scipy_id = wx.NewId()
         self.park_id = wx.NewId()
+        self.bumps_id = wx.NewId()
         self.menu1 = None
         self.new_model_frame = None
@@ -198,6 +199,12 @@
         wx.EVT_MENU(owner, self.park_id, self._onset_engine_park)
         
+        bumps_help = "Bumps: fitting and uncertainty analysis. More in Help window...."
+        self.menu1.AppendCheckItem(self.bumps_id, "Bumps fit",
+                                   bumps_help)
+        wx.EVT_MENU(owner, self.bumps_id, self._onset_engine_bumps)
+        
         self.menu1.FindItemById(self.scipy_id).Check(True)
         self.menu1.FindItemById(self.park_id).Check(False)
+        self.menu1.FindItemById(self.bumps_id).Check(False)
         self.menu1.AppendSeparator()
         self.id_tol = wx.NewId()
@@ -207,4 +214,11 @@
                                    ftol_help)
         wx.EVT_MENU(owner, self.id_tol, self.show_ftol_dialog)
+
+        self.id_bumps_options = wx.NewId()
+        bopts_help = "Bumps fitting options"
+        self.menu1.Append(self.id_bumps_options, 'Bumps &Options', bopts_help)
+        wx.EVT_MENU(owner, self.id_bumps_options, self.on_bumps_options)
+        self.bumps_options_menu = self.menu1.FindItemById(self.id_bumps_options)
+        self.bumps_options_menu.Enable(True)
         self.menu1.AppendSeparator()
         
@@ -819,4 +833,8 @@
         dialog.Destroy()
 
+    def on_bumps_options(self, event=None):
+        from bumps.gui.fit_dialog import OpenFitOptions
+        OpenFitOptions()
+
     def stop_fit(self, uid):
         """
@@ -959,5 +977,5 @@
         self._gui_engine = self._return_engine_type()
         self.fitproblem_count = fitproblem_count
-        if self._fit_engine == "park":
+        if self._fit_engine in ("park","bumps"):
             engineType = "Simultaneous Fit"
         else:
@@ -1682,4 +1700,10 @@
         self._on_change_engine('scipy')
        
+    def _onset_engine_bumps(self, event):
+        """ 
+        set engine to bumps
+        """
+        self._on_change_engine('bumps')
+       
     def _on_slicer_event(self, event):
         """
@@ -1733,7 +1757,13 @@
             self.menu1.FindItemById(self.park_id).Check(True)
             self.menu1.FindItemById(self.scipy_id).Check(False)
+            self.menu1.FindItemById(self.bumps_id).Check(False)
+        elif engine == "scipy":
+            self.menu1.FindItemById(self.park_id).Check(False)
+            self.menu1.FindItemById(self.scipy_id).Check(True)
+            self.menu1.FindItemById(self.bumps_id).Check(False)
         else:
             self.menu1.FindItemById(self.park_id).Check(False)
-            self.menu1.FindItemById(self.scipy_id).Check(True)
+            self.menu1.FindItemById(self.scipy_id).Check(False)
+            self.menu1.FindItemById(self.bumps_id).Check(True)
         ## post a message to status bar
         msg = "Engine set to: %s" % self._fit_engine
Index: test/park_integration/test/test_fit_line.py
===================================================================
--- test/park_integration/test/test_fit_line.py	(revision da5d8e8ddcd10ca55862386be6991a9817ba1897)
+++ test/park_integration/test/test_fit_line.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -4,4 +4,5 @@
 """
 import unittest
+import math
 
 from sans.fit.AbstractFitEngine import Model
@@ -11,5 +12,4 @@
 from sans.models.Constant import Constant
 
-import math
 class testFitModule(unittest.TestCase):
     """ test fitting """
@@ -21,5 +21,8 @@
         data.name = data.filename
         #Importing the Fit module
-        fitter = Fit('scipy')
+        from bumps import fitters
+        fitters.FIT_DEFAULT = 'dream'
+        print fitters.FIT_OPTIONS['dream'].__dict__
+        fitter = Fit('bumps')
         # Receives the type of model for the fitting
         model1  = LineModel()
@@ -44,4 +47,5 @@
         self.assertTrue( result1.fitness/len(data.x) < 2 )
 
+        return
         #fit with park test
         fitter = Fit('park')
@@ -103,5 +107,6 @@
            assert str(msg)=="Scipy can't fit more than a single fit problem at a time."
         else: raise AssertionError,"No error raised for scipy fitting with more than 2 models"
-        
+
+        return
         #fit with park test
         fitter = Fit('park')
@@ -121,4 +126,5 @@
     def test3(self):
         """ fit 2 data and 2 model with 1 constrainst"""
+        return
         #load data
         l = Loader()
@@ -189,4 +195,5 @@
         
         result1, = fitter.fit()
+        #print(result1)
         self.assert_(result1)
 
@@ -194,5 +201,6 @@
         self.assertTrue( math.fabs(result1.pvec[1]-2.5)/3 <= result1.stderr[1])
         self.assertTrue( result1.fitness/len(data1.x) < 2 )
-        
+
+        return
         #fit with park test
         fitter = Fit('park')
@@ -213,6 +221,7 @@
         self.assertAlmostEquals( result1.stderr[1],result2.stderr[1] )
         self.assertTrue( result2.fitness/(len(data2.x)+len(data1.x)) < 2 )
-        
-        
+
+
+if __name__ == "__main__":
+    unittest.main()
     
-    
Index: test/pr_inversion/test/test_output.txt
===================================================================
--- test/pr_inversion/test/test_output.txt	(revision 6c007022258cff8efb5208e90301244c22e30170)
+++ test/pr_inversion/test/test_output.txt	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -3,5 +3,5 @@
 #alpha=0.0007
 #chi2=836.797
-#elapsed=0.000999928
+#elapsed=0.000168085
 #qmin=None
 #qmax=None
Index: test/run_one.py
===================================================================
--- test/run_one.py	(revision 6c007022258cff8efb5208e90301244c22e30170)
+++ test/run_one.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -1,2 +1,4 @@
+#!/usr/bin/env python
+
 import os
 import sys
@@ -12,5 +14,5 @@
 #print "\n".join(sys.path)
 test_path,test_file = splitpath(sys.argv[1])
-print "test file",sys.argv[1]
+print "=== testing:",sys.argv[1]
 #print test_path, test_file
 sys.argv = [sys.argv[0]]
@@ -19,3 +21,2 @@
 test = imp.load_source('tests',test_file)
 unittest.main(test, testRunner=xmlrunner.XMLTestRunner(output='logs'))
-
Index: test/utest_sansview.py
===================================================================
--- test/utest_sansview.py	(revision 6c007022258cff8efb5208e90301244c22e30170)
+++ test/utest_sansview.py	(revision 6fe51002a81260397b29374005fb3e465ff93b4a)
@@ -1,2 +1,3 @@
+#!/usr/bin/env python
 import os
 import subprocess
