From bb2a4fbcb28c32a56c17d04e1cd98f7c910a2898 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 18 Jan 2009 14:47:35 +0000 Subject: [PATCH] Added gc to environment, with preset flags for checking uncollectable objects svn: r11657 --- src/plugins/gramplet/DefaultGramplets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/gramplet/DefaultGramplets.py b/src/plugins/gramplet/DefaultGramplets.py index 2cd28fe5e..7699e10f4 100644 --- a/src/plugins/gramplet/DefaultGramplets.py +++ b/src/plugins/gramplet/DefaultGramplets.py @@ -793,10 +793,14 @@ class StatsGramplet(Gramplet): class PythonGramplet(Gramplet): def init(self): + import gc + gc.set_debug(gc.DEBUG_UNCOLLECTABLE|gc.DEBUG_OBJECTS|gc.DEBUG_SAVEALL) self.prompt = ">" self.set_tooltip(_("Enter Python expressions")) + self.gc = gc self.env = {"dbstate": self.gui.dbstate, "uistate": self.gui.uistate, + "gc": self.gc, "self": self, _("class name|Date"): gen.lib.Date, }