Ignore:
Timestamp:
Nov 15, 2017 4:33:09 AM (6 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:
d4881f6a
Parents:
7c487846
Message:

Initial commit of the P(r) inversion perspective.
Code merged from Jeff Krzywon's ESS_GUI_Pr branch.
Also, minor 2to3 mods to sascalc/sasgui to enble error free setup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fit_thread.py

    • Property mode changed from 100644 to 100755
    rf4a1433 rfa81e94  
    1111 
    1212def map_apply(arguments): 
    13     return apply(arguments[0], arguments[1:]) 
     13    return arguments[0](*arguments[1:]) 
    1414 
    1515class FitThread(CalcThread): 
     
    4949        except KeyboardInterrupt: 
    5050            msg = "Fitting: terminated by the user." 
    51             raise KeyboardInterrupt, msg 
     51            raise KeyboardInterrupt(msg) 
    5252 
    5353    def compute(self): 
     
    7272                list_map_get_attr.append(map_getattr) 
    7373            #from multiprocessing import Pool 
    74             inputs = zip(list_map_get_attr, self.fitter, list_fit_function, 
     74            inputs = list(zip(list_map_get_attr, self.fitter, list_fit_function, 
    7575                         list_q, list_q, list_handler, list_curr_thread, 
    76                          list_reset_flag) 
    77             result = map(map_apply, inputs) 
     76                         list_reset_flag)) 
     77            result = list(map(map_apply, inputs)) 
    7878 
    7979            self.complete(result=result, 
     
    8484                          elapsed=time.time() - self.starttime) 
    8585 
    86         except KeyboardInterrupt, msg: 
     86        except KeyboardInterrupt as msg: 
    8787            # Thread was interrupted, just proceed and re-raise. 
    8888            # Real code should not print, but this is an example... 
Note: See TracChangeset for help on using the changeset viewer.