This is Guppy 3 version 3.0.1

A Python Programming Environment & Heap analysis toolset.

CONTENTS

This distribution provides a root package, guppy, with the following
subpackages:

doc       Documentation data files: *.html, *.jpg, and help support.

etc       Support modules. Contains especially the Glue protocol module.

gsl       The Guppy Specification Language implementation. This can
          be used to create documents and tests from a common source.

heapy     The heap analysis toolset. It can be used to find information
          about the objects in the heap and display the information
          in various ways.

sets      Bitsets and 'nodesets' implemented in C.

The following files are not in packages but on the toplevel:

gsl-mode-0.1.el       Emacs mode for GSL
specs/*.gsl           Specifications
specs/genguppydoc.py  Regenerates the doc/*.html files from specs/*.gsl

REQUIREMENTS

You should have Python 3.5, 3.6, or 3.7.

To build the system so you can use Heapy, you should have what is
needed to build extension modules from source code. The extension
modules are used not only in Heapy but also in GSL in some
situations. (The test generator uses bitsets to speed up an
algorithm.)

To use the graphical browser, Tkinter is needed.
To use the remote monitor, threading must be available.

INSTALLATION

Install with pip by:

pip install guppy3

I also note that the documentation files and emacs-mode are not
automatically installed.

HEAPY USAGE EXAMPLE

The following example shows

1. How to create the session context: h=hpy()
2. How to show the reachable objects in the heap: h.heap()
3. How to create and show a set of objects: h.iso(1,[],{})
4. How to show the shortest paths from the root to x: h.iso(x).sp

>>> from guppy import hpy; h=hpy()
>>> h.heap()
Partition of a set of 30940 objects. Total size = 3562865 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0   8233  27   737593  21    737593  21 str
     1   7827  25   625128  18   1362721  38 tuple
     2    400   1   353952  10   1716673  48 type
     3   2077   7   299088   8   2015761  57 types.CodeType
     4   4164  13   296152   8   2311913  65 bytes
     5   1867   6   268848   8   2580761  72 function
     6    400   1   230376   6   2811137  79 dict of type
     7     79   0   139704   4   2950841  83 dict of module
     8   1080   3    95040   3   3045881  85 types.WrapperDescriptorType
     9    169   1    76504   2   3122385  88 dict (no owner)
<87 more rows. Type e.g. '_.more' to view.>
>>> h.iso(1,[],{})
Partition of a set of 3 objects. Total size = 352 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0      1  33      248  70       248  70 dict (no owner)
     1      1  33       72  20       320  91 list
     2      1  33       32   9       352 100 int
>>> x=[]
>>> h.iso(x).sp
 0: h.Root.i0_modules['__main__'].__dict__['x']
>>>

TEST

To test if the heapy build and installation was ok, you can do:

>>> from guppy import hpy
>>> hpy().test()
Testing sets
Test #0
Test #1
Test #2
...

There will be several more tests. Some tests may take a while.

Caveat: Some tests may be somewhat picky, and may have to be relaxed
to pass in different installations.

LICENSE

Copyright (C) 2005-2013 Sverker Nilsson, S. Nilsson Computer System AB
Copyright (C) 2019 YiFei Zhu

The right is granted to copy, use, modify and redistribute this code
according to the rules in what is commonly referred to as an MIT
license.

*** USE AT YOUR OWN RISK AND BE AWARE THAT THIS IS AN EARLY RELEASE ***
