ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ;Pc@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z yddl Z Wne k rnXddl Z ddlZddlTddlmZddlmZddlmZddlmZdejfdYZd Zd d ZdZd ejfdYZdejfdYZ dddYZ!dZ"e#dkre"ndS(iN(t*(tConsole(t mutnodeset(tptable(tcmdtServercBseZRS((t__name__t __module__(((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRscCs.tj|ggg|\}}}t|S(N(tselecttlen(tfdtwaittrtwtx((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytioreadys$icCs@x9y|jddSWqtjk r7|r8Pq8qXqWdS(Nttimeoutg?(tgettQueuetEmpty(tqtnoblock((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytqueue_get_interruptibles tCLOSEDtHandlercBsSeZdZdZdZdZdddZdZdZdZ RS( icCsY|jjdsU|jjj||jjt|jj d|jj ndS(Nii( tisclosedttastservertmonitortremove_connectiontdataqtputt CONN_CLOSEDtrequesttshutdowntclose(tself((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR#)s cCs0|jds|d7}n|jj|dS(Ns (tendswithR!tsend(R$R((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytsend_cmd0s cCs]|jdkr%|jdddn|jdkrJ|jdddn|j|ddS(Ns>>> Rtretdatais tcont(tprompttexec_cmd(R$R((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyt browser_cmd5s icCs+|dk r%|j|t|_ng}xt|j|}|dkrl|jrYPqltjdq.n|tkrt n|ddkrt|_|r|j |dqt j j |dq.|ddkr.|d|_|jjrt|_Pqt|_q.q.W|r'dj|SdS(NiitDATAtPROMPTt(tNoneR'tFalset promptstateRRttimetsleepR tEOFErrortappendtsyststdouttwriteR*temptytTruetjoin(R$RR(Rtdatastp((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR+<s6            cCsfx_|jjdD]K}|j|rd|krZ|jd}||dj}n|SqWdS(Ns t=iR/(t firstdatatsplitt startswithtindextstrip(R$tnametlinetix((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytget_ps]s cCs |jd|}tj|S(Nsdump %s(R,tpickletloads(R$texprtdata((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytget_valfscCs/d|_t|_t|_tj|_|jj j |xy@|j j }|sgt dn|jtrt dnWnt tjfk rPnX|jtr|tt }|jjd|f|jdkr|jdddd|_qqC|jjd|fqCW|jdS(Ns End of filetDONER.RR(iR-(R0R*R1R2RRRRRRtadd_connectiontrfiletreadlineR5R%RNtsocketterrortREADLINER RR+R@R#(R$RLR*((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pythandleks*    !( RRtallow_reuse_addressR#R'R,R+RHRMRU(((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR&s   ! tMonitorConnectioncBseZdZdZdZdZdZdZdZdZ dZ d Z e j jZd Zd Zd Zd ZdZdZdZdZdZdZdZdZRS(icCsi|_tjj|d|_d|_d|_d|_||_t t t ft |_ }||j _tjd|jdd|_|jjdS(Nis ttargettargs((taliasesRtCmdt__init__thnoRt forceexitR*RRt LOCALHOSTt HEAPYPORTRRt threadingtThreadt run_servertsttstart(R$Rts((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR\s        cCs<d|_|jjjd|jjd|j_dS(NiicSsdS(Ni((Rty((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytR/(RRRRR"t server_closetverify_request(R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR#s  cCs*tjj||tjj|ddS(NR/(RR[tdefaulttdo_help(R$RF((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRkscCs1|j}x|js"|jq W|jdS(N(RRthandle_requestRi(R$Rf((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRcs  cCsc|s dS|}y8|j|}|j|}|j||}|SWn|j|nXdS(N(tprecmdtonecmdtpostcmdt handle_error(R$RRFtstop((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR+scCs\tjddIJtjdItjt|IJddl}|jtjddIJdS(sfHandle an error gracefully. May be overridden. The default is to print a traceback and continue. t-i(s0Exception happened during processing the commandiN(R7tstderrtreprt tracebackt print_exc(R$tcmdlineRv((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRqs    cCsu||_|s|S|j}x|jj|dr |j|d}d|krd}xa|dD]U}|jdt||}|jdt|dj||}|d}qfW|jddj|d}n|ddj|d}|j}q"W|ddkrq|jd}|dkrq||d j}|j j ||| j }qqn|S( s*Handle alias expansion and ';;' separator.it%is%>=t s%*taliass;;i( tcurlineRARZthas_keytreplacetstrR<tfindtlstriptcmdqueueR6trstrip(R$RFRYtiittmpArgtmarkertnext((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRns0    " cCs d|_dS(Ni(R^(R$targ((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytdo_exits cCs dGHdS(Nsexit ----- Exit from the monitor and from the Python process that started it. This makes sure to exit without waiting for the server thread to terminate. See also the q command.((R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyt help_exitscCs dGHdS(Nsh(elp) ----- Without argument, print the list of available commands. With a command name as argument, print help about that command.((R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pythelp_hscCs|jdS(N(R(R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyt help_helpscCsDz<td|jd|jd|j}|jd|jWdXdS(NtstdinR8tlocalss9Local interactive console. To return to Monitor, type %r.(RRR8t__dict__tinteracttEOF_key_sequence(R$Rtcon((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytdo_ints cCs dGHdS(Nsint ----- Local interactive console. This will bring up a Python console locally in the same interpreter process that the Monitor itself.((R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pythelp_intscCs_|s|j}nt|}|jj|}|jdrEdGHnd|GH|jtdS(NtnoninterruptiblesCError: Can not interrupt this remote connection (uses Python < 2.4)s+Sending KeyboardInterrupt to connection %s.(tconidtintRt connectionsRHR'tKEYBOARDINTERRUPT(R$Rtc((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytdo_kis   cCs dGHdS(Ns\ki ----- Keyboard Interrupt Send a command to interrupt the remote thread on the specified connection (default is the last one connected to). Notes: It currently only works with Python >= 2.4. The remote thread will not always be awakened, for example if it is waiting in time.sleep(). Sometimes using several ki commands helps.((R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pythelp_kis cCsqdddgg}xH|jjjD]4\}}|j||jd|jdgq%Wt||jdS(NtCIDtPIDtARGVs target.pidstarget.sys.argv(RRtitemsR6RHRR8(R$RttabletcidR((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytdo_lc*s   cCs dGHdS(Nslc ----- List Connections. List the currently open connections. The table printed has one line per connection in this form: CID PID ARGV 1 17999 ['/home/nilsson/bin/solitaire.py'] CID is the connection ID, which may be used as argument to the sc command. PID is the process ID of the target interpreter process. In Linux, this is the parent of the remote control interpreter thread that runs the Annex that the connection is talking to. ARGV is the argument vector in the target Python interpereter.((R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pythelp_lc3scCsE|rt||_nd|jGH|jj|jj|jdS(NsFRemote connection %d. To return to Monitor, type or .(RRRtset_connectionR(R$R((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytdo_scGs cCs dGHdS(Nspsc ----- Set connection to communicate with a remote thread. With an argument, set current connection to the number specified. Without argument, use the same connection as last time. You will then be talking to a remote process via that connection. You can return to Monitor at any time by . You may also use the '.' command (followed by ), if the remote process is waiting for input. The '.' character may be followed by a monitor command, to execute it directly instead of returning to the monitor. For example, when talking to a connection, '.sc 1' will directly change to connection 1.((R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pythelp_scMs cCsdS(Ni((R$R((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytdo_q[scCs dGHdS(Nsq ----- Quit from the monitor. This will not exit from Python itself if called from an interactive interpreter. To make sure to exit from Python, use the exit command.((R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pythelp_q^s(RRt use_raw_inputR\R#RkRcR+RqRnRRRR[Rltdo_hRRRRRRRRRRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRWs.                 tMonitorcBsVeZdZdZdZdZdZdZdZdZ dZ RS( icCs5t||_|_i|_d|_d|_dS(Ni(RWt connectiontmonitor_connectionRtidsR0R*(R$((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR\hs  cCsa|js$d|_|j|j_n6tdgg|jjD] }|^q=d|_|jS(Ni(RRRRtmaxtkeys(R$R((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytnewidns   6cCs7|j}||j|<||_|jd|dS(Ns*** Connection %s opened ***(RRt monitor_idt print_async(R$Rthid((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyROvs   cCs?|jdk r;d|GHtjj|jtjjndS(sL Print text only if we are waiting for input, and then restore the prompt. s N(R*R0R7R8R9tflush(R$ttext((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR}s cCsG|j|j=||jkr/|j|jn|jd|jdS(Ns*** Connection %s closed ***(RRRRRR(R$R((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRs cCsztd}xg|sry x|s|j}|j|_||jk r[|jddddnt|j}d|_d}|jdr|dkr|j|_q|d}|j}n |j}|ry|j|}Wntk rd}nX||jkr|rd}qqqWWq tk rEdGH|j|_d}q tk rndGHdGH|j|_q q Xq WWdd|_|j XdS( NiRRit.s%*** End Of File - Exiting Monitor ***tKeyboardInterrupts1Use the ki command to interrupt a remote process.( RR*RR+R0t raw_inputRBR5RR#(R$RrtconnRR ((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pytrunsH                 cCsx<|jjD]+}y|jWqtjk r:qXqWy|jjWntjk rfnX|jjrtjdndS(Ni( RtvaluesR#RRRSRR^tost_exit(R$R((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyR#s cCs||_|j|_dS(N(RR*(R$R((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRs ( RRRR\RRORRRR#R(((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRes      1 cCs1ddlm}|jt}|jdS(smonitor() [0] Start an interactive remote monitor. This can be used to get information about the state, in particular the memory usage, of separately running Python processes. References [0] heapy_Use.html#heapykinds.Use.monitori(tRemoteN(t guppy.heapyRtoffRR(Rtm((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyRs   t__main__(R(($RtpprinttsignalRRt SocketServerR7RaR3RvtcPickleRIRQt ImportErrorRRtguppy.heapy.RemoteConstantstguppy.heapy.ConsoleRt guppy.setsRt guppy.etc.etcRt guppy.etcRtThreadingTCPServerRRRR tStreamRequestHandlerRR[RWRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/Monitor.pyts*l     _j