user interface - How to avoid freezing of GUI while linking python muliprocessing script linked to a gui (python script should run in background) -


i have python script linked gui , runs in background.based on input gui python script should send messages accordingly.but link script( using multiprocessing) gui,screen freezes.is there doing wrong?please provide me solution.

from multiprocessing import process slider_perc= [0.0 ,10.0,20.0,30.0,40.0,50,60.0,70.0,80.0,90.0,100]            slider_output_msg=["a","b","c","d","e","f","g","h","i","j"]  slider_dictionary=dict(zip(slider_perc,slider_output_msg)) def change_slider():     slider_pos=myappl.variable(slider).read()     slider_pos_round=int(round(slider_pos,-1))      desired_slider_position=dict((k,slider_dictionary[k]) k in  [slider_pos_round] if k in slider_dictionary)     desired_slider_message=desired_slider_position.values()     txmessage_out=desired_slider_message     status = vt.getmessageresponse(txmessage_out,rxpattern,timeout,flag) def main():     p = process(target=change_slider())     p.start()     p.join() main() 


Comments