<s> import os , sys , time , threading <EOL> import wx <EOL> import CustomEvents <EOL> if - <NUM_LIT:1> != sys . path [ <NUM_LIT:0> ] . find ( '<STR_LIT>' ) : raise Exception ( '<STR_LIT>' ) <EOL> exampleFileDirectory = sys . path [ <NUM_LIT:0> ] [ : sys . path [ <NUM_LIT:0> ] . rfind ( os . sep ) ] <EOL> pyeq2IimportDirectory = os . path . join ( os . path . join ( exampleFileDirectory , '<STR_LIT:..>' ) , '<STR_LIT:..>' ) <EOL> if pyeq2IimportDirectory not in sys . path : <EOL> sys . path . append ( pyeq2IimportDirectory ) <EOL> import pyeq2 <EOL> class FittingThread ( threading . Thread ) : <EOL> def __init__ ( self , notify_window , equation ) : <EOL> threading . Thread . __init__ ( self ) <EOL> self . _notify_window = notify_window <EOL> self . equation = equation <EOL> self . start ( ) <EOL> def run ( self ) : <EOL> statusString = '<STR_LIT>' <EOL> wx . PostEvent ( self . _notify_window , CustomEvents . ThreadStatusEvent ( statusString ) ) <EOL> time . sleep ( <NUM_LIT:0.5> ) <EOL> self . equation . Solve ( ) <EOL> statusString = '<STR_LIT>' <EOL> wx . PostEvent ( self . _notify_window , CustomEvents . ThreadStatusEvent ( statusString ) ) <EOL> time . sleep ( <NUM_LIT:0.5> ) <EOL> self . equation . CalculateModelErrors ( self . equation . solvedCoefficients , self . equation . dataCache . allDataCacheDictionary ) <EOL> statusString = '<STR_LIT>' <EOL> wx . PostEvent ( self . _notify_window , CustomEvents . ThreadStatusEvent ( statusString ) ) <EOL> time . sleep ( <NUM_LIT:0.5> ) <EOL> self . equation . CalculateCoefficientAndFitStatistics ( ) <EOL> statusString = '<STR_LIT>' <EOL> wx . PostEvent ( self . _notify_window , CustomEvents . ThreadStatusEvent ( statusString ) ) <EOL> time . sleep ( <NUM_LIT:0.5> ) <EOL> wx . PostEvent ( self . _notify_window , CustomEvents . ThreadStatusEvent ( self . equation ) ) </s>
