Added gc to environment, with preset flags for checking uncollectable objects
svn: r11657
This commit is contained in:
parent
45a78a2046
commit
bb2a4fbcb2
@ -793,10 +793,14 @@ class StatsGramplet(Gramplet):
|
|||||||
|
|
||||||
class PythonGramplet(Gramplet):
|
class PythonGramplet(Gramplet):
|
||||||
def init(self):
|
def init(self):
|
||||||
|
import gc
|
||||||
|
gc.set_debug(gc.DEBUG_UNCOLLECTABLE|gc.DEBUG_OBJECTS|gc.DEBUG_SAVEALL)
|
||||||
self.prompt = ">"
|
self.prompt = ">"
|
||||||
self.set_tooltip(_("Enter Python expressions"))
|
self.set_tooltip(_("Enter Python expressions"))
|
||||||
|
self.gc = gc
|
||||||
self.env = {"dbstate": self.gui.dbstate,
|
self.env = {"dbstate": self.gui.dbstate,
|
||||||
"uistate": self.gui.uistate,
|
"uistate": self.gui.uistate,
|
||||||
|
"gc": self.gc,
|
||||||
"self": self,
|
"self": self,
|
||||||
_("class name|Date"): gen.lib.Date,
|
_("class name|Date"): gen.lib.Date,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user