Ignore:
Timestamp:
Nov 9, 2017 8:41:54 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
cee5c78
Parents:
749b715
git-author:
Piotr Rozyczko <rozyczko@…> (10/26/17 03:13:05)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:41:54)
Message:

Initial changes to make SasView? run with python3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FitThread.py

    ree18d33 rb3e8629  
    1414 
    1515def map_apply(arguments): 
    16     return apply(arguments[0], arguments[1:]) 
     16    return arguments[0](*arguments[1:]) 
    1717 
    1818class FitThread(CalcThread): 
     
    5555        except KeyboardInterrupt: 
    5656            msg = "Fitting: terminated by the user." 
    57             raise KeyboardInterrupt, msg 
     57            raise KeyboardInterrupt(msg) 
    5858 
    5959    def compute(self): 
     
    7171            list_q = [None]*fitter_size 
    7272 
    73             inputs = zip(list_map_get_attr, self.fitter, list_fit_function, 
     73            inputs = list(zip(list_map_get_attr, self.fitter, list_fit_function, 
    7474                         list_q, list_q, list_handler, list_curr_thread, 
    75                          list_reset_flag) 
    76             result = map(map_apply, inputs) 
     75                         list_reset_flag)) 
     76            result = list(map(map_apply, inputs)) 
    7777            results = (result, time.time()-self.starttime) 
    7878            if self.handler: 
     
    8181                return (results) 
    8282 
    83         except KeyboardInterrupt, msg: 
     83        except KeyboardInterrupt as msg: 
    8484            # Thread was interrupted, just proceed and re-raise. 
    8585            # Real code should not print, but this is an example... 
Note: See TracChangeset for help on using the changeset viewer.