Current File : //lib64/python2.7/Tools/scripts/hotshotmain.pyc
�
�fc@s�dZddlZddlZddlZddlZddlZdZd�Zd�Ze dkr�ej
eejd��ndS(s�
Run a Python script under hotshot's control.
Adapted from a posting on python-dev by Walter D�rwald
usage %prog [ %prog args ] filename [ filename args ]
Any arguments after the filename are used as sys.argv for the filename.
i����Nshotshot.profcCs�tj|�}tjjdtjj|��|g|t_|jd|�|j �tj
j|�}|jdd�tj
}tjt_
|j�|t_
dS(Nisexecfile(%r)ttimetcalls(thotshottProfiletsystpathtinserttostdirnametargvtruntclosetstatstloadt
sort_statststdouttstderrtprint_stats(tfilenametprofiletargstprofRtsave_stdout((s1/usr/lib64/python2.7/Tools/scripts/hotshotmain.pytrun_hotshots
cCs�tjt�}|j�|jdddddtdddd �|j|�\}}t|�d
kry|jd�dS|d
}t ||j
|d�S(
Ns-ps --profiletactiontstoretdefaulttdestRthelpsSpecify profile file to useismissing script to executei(toptparsetOptionParsert__doc__tdisable_interspersed_argst
add_optiontPROFILEt
parse_argstlent
print_helpRR(RtparsertoptionsR((s1/usr/lib64/python2.7/Tools/scripts/hotshotmain.pytmain(s
t__main__i(RRRRRt
hotshot.statsR"RR(t__name__texitR (((s1/usr/lib64/python2.7/Tools/scripts/hotshotmain.pyt<module>s