g%ddlZddlZddlZddlZddlmZmZddlmZddlm Z ddlm Z gdZ ejdk7rd Z d ZnAeed d Z ej xr)ej j#j%d Zd Zd Zer-eej*j-ej.dneej dZdZdZddZdZdZdZgZdZ dZ!dZ"dZ#y)N)get_start_methodset_start_method)process) reduction)util)_mainfreeze_supportset_executableget_executableget_preparation_dataget_command_lineimport_main_pathwin32Ffrozenzpythonservice.exec||aytjdk(rtj|aytj |ay)Nr) _python_exesysplatformosfsdecodefsencode)exes z#get_command_line..\sB\T'D.\sz-c)getattrr executableitemsjoinr_args_from_interpreter_flagsr )r,r4progoptsrs rrrSssHe$!9:,0JJL9LD4L9: ;N  BTZZ\BBB002ut|tT+CDDD :s Bc tjdk(rqddl}ddl}|+|j |j |j zd|}nd}tj||}|j|tj}|}n.ddl m } || j_|}tj |}t#||} tj$| y)NrrF)source_processr)resource_tracker)rrmsvcrt_winapi OpenProcess SYNCHRONIZEPROCESS_DUP_HANDLEr duplicateopen_osfhandlerO_RDONLYr?_resource_tracker_fddupr r+) pipe_handle parent_pid tracker_fdr@rAr> new_handlefdparent_sentinelr?exitcodes rr*r*bs ||w  !$00##g&@&@@z#N"N((8FH  " ":r{{ ;(&1;**. &&-R)HHHXrctj|dd5}dtj_ t j j|}t|t j j|}tj` dddj|S#tj`wxYw#1swY3xYw)NrbT)closefd) rfdopenrcurrent_process _inheritingrpickleloadprepare _bootstrap)rPrQ from_parentpreparation_dataselfs rr r ~s 2tT *k04!- 6(//44[A  $ %##((5D'')5 + ??? ++'')5 + *s#CA B+=C+CCC cXttjddr tdy)NrXFa An attempt has been made to start a new process before the current process has finished its bootstrapping phase. This probably means that you are not using fork to start your child processes and you have forgotten to use the proper idiom in the main module: if __name__ == '__main__': freeze_support() ... The "freeze_support()" line can be omitted if the program is not going to be frozen to produce an executable. To fix this issue, refer to the "Safe importing of main module" section in https://docs.python.org/3/library/multiprocessing.html )r6rrW RuntimeErrorrrr_check_not_importing_mainrbs/w&&(-?   @rc  tttjt j j }tj!tjj|d<tjj} |jd}tj||<|j||tj tjt#j$t'tj(d}t+|j,dd}|||d<|Stj.dk7s t0st2st+|d d}|t"jj5|s>tj.t"jj7tj|}t"jj9||d <|S#t$rY;wxYw) N) log_to_stderrauthkey log_levelrH)r.sys_pathsys_argvorig_dirdir start_method__main__r.init_main_from_namer__file__init_main_from_path)rbdictr_log_to_stderrrrWre_loggergetEffectiveLevelrpathcopyindex ORIGINAL_DIR ValueErrorupdater#rgetcwdrmodulesr6__spec__rWINEXE WINSERVICEisabsr9normpath)r.drgi main_module main_mod_name main_paths rr r s ))'')11 A  ||779+ XX]]_H+ NN2 ** HH %% IIK%'   ++j)KK00&$?M #0   H   KT:  GGMM),,,8GGLL)=)=yI ')ww'7'7 'BA# $ H9    sG&& G32G3c, d|vr|dtj_d|vr|dtj_d|vr|drt j d|vr&t j j|dd|vr|dt_ d|vr|dt_ d|vrtj|dd|vr|dt_ d |vrt|d d d |vrt|d yd |vrt!|d yy)Nr.rerdrfrgrhrjrirkT)forcermro)rrWr.rerrd get_loggersetLevelrrtr#rchdirrwr_fixup_main_from_name_fixup_main_from_path)datas rr[r[s~)-f!&D,0O!)$4#8 d ""4 #45T #T # } eT#J/n-T:$d#89: $ &d#89: 'rctjd}|dk(s|jdryt|jdd|k(ryt j |tjd}tj|dd}|jj||xtjd<tjd<y)Nrlz .__main__r. __mp_main__T)run_name alter_sys) rr{endswithr6r|old_main_modulesappendtypes ModuleTyperunpy run_module__dict__ry)mod_name current_mainr main_contents rrrs ;;z*L:!2!2;!?|$$fd3x? L)""=1K##H-:.24L -;FFCKK ckk-8rctjd}tjj tjj |d}|dk(ryt |dd|k(rytj|tjd}tj|d}|jj||xtjd<tjd<y)Nrlripythonrnr)r)rr{rrtsplitextbasenamer6rrrrrrun_pathrry)rr main_namerrs rrrs;;z*L   !1!1)!<=a@II|Z.); L)""=1K>>)+8:L -;FFCKK ckk-8rc t|yr)r)rs rrr/s)$r)NN)$rrrrrHrrrcontextrr__all__rr}r~r6r7lowerrr r rtr9 exec_prefixr$r rr*r rbr rr[rrrrrrrs 0 K<<7 FJ S(E *FXCNN$8$8$:$C$CDW$XJ'277<<>?3>>"   E8 , ,, d";LG2G8%r