Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
idlelib.StackViewer.StackTreeItem Class Reference
Inheritance diagram for idlelib.StackViewer.StackTreeItem:
Inheritance graph
[legend]
Collaboration diagram for idlelib.StackViewer.StackTreeItem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def get_stack
def get_exception
def GetText
def GetSubList
def GetLabelText
def IsExpandable
def IsEditable
def SetText
def GetIconName
def GetSelectedIconName
def OnDoubleClick

Public Attributes

 flist
 stack
 text

Static Public Attributes

 expandable = None

Detailed Description

Definition at line 18 of file StackViewer.py.


Constructor & Destructor Documentation

def idlelib.StackViewer.StackTreeItem.__init__ (   self,
  flist = None,
  tb = None 
)

Definition at line 20 of file StackViewer.py.

00020 
00021     def __init__(self, flist=None, tb=None):
00022         self.flist = flist
00023         self.stack = self.get_stack(tb)
00024         self.text = self.get_exception()

Here is the caller graph for this function:


Member Function Documentation

Definition at line 36 of file StackViewer.py.

00036 
00037     def get_exception(self):
00038         type = sys.last_type
00039         value = sys.last_value
00040         if hasattr(type, "__name__"):
00041             type = type.__name__
00042         s = str(type)
00043         if value is not None:
00044             s = s + ": " + str(value)
00045         return s

Here is the caller graph for this function:

Definition at line 25 of file StackViewer.py.

00025 
00026     def get_stack(self, tb):
00027         if tb is None:
00028             tb = sys.last_traceback
00029         stack = []
00030         if tb and tb.tb_frame is None:
00031             tb = tb.tb_next
00032         while tb is not None:
00033             stack.append((tb.tb_frame, tb.tb_lineno))
00034             tb = tb.tb_next
00035         return stack

def idlelib.TreeWidget.TreeItem.GetIconName (   self) [inherited]
Return name of icon to be displayed normally.

Reimplemented in idlelib.TreeWidget.FileTreeItem, idlelib.ClassBrowser.MethodBrowserTreeItem, idlelib.ClassBrowser.ClassBrowserTreeItem, idlelib.ClassBrowser.ModuleBrowserTreeItem, and idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 349 of file TreeWidget.py.

00349 
00350     def GetIconName(self):
00351         """Return name of icon to be displayed normally."""

def idlelib.TreeWidget.TreeItem.GetLabelText (   self) [inherited]
Return label text string to display in front of text (if any).

Reimplemented in idlelib.StackViewer.VariablesTreeItem, and idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 319 of file TreeWidget.py.

00319 
00320     def GetLabelText(self):
00321         """Return label text string to display in front of text (if any)."""

Return name of icon to be displayed when selected.

Definition at line 352 of file TreeWidget.py.

00352 
00353     def GetSelectedIconName(self):
00354         """Return name of icon to be displayed when selected."""

Return list of items forming sublist.

Reimplemented from idlelib.TreeWidget.TreeItem.

Definition at line 49 of file StackViewer.py.

00049 
00050     def GetSubList(self):
00051         sublist = []
00052         for info in self.stack:
00053             item = FrameTreeItem(info, self.flist)
00054             sublist.append(item)
00055         return sublist

Here is the caller graph for this function:

Return text string to display.

Reimplemented from idlelib.TreeWidget.TreeItem.

Definition at line 46 of file StackViewer.py.

00046 
00047     def GetText(self):
00048         return self.text

def idlelib.TreeWidget.TreeItem.IsEditable (   self) [inherited]
Return whether the item's text may be edited.

Reimplemented in idlelib.TreeWidget.FileTreeItem, and idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 343 of file TreeWidget.py.

00343 
00344     def IsEditable(self):
00345         """Return whether the item's text may be edited."""

def idlelib.TreeWidget.TreeItem.IsExpandable (   self) [inherited]
def idlelib.TreeWidget.TreeItem.OnDoubleClick (   self) [inherited]
Called on a double-click on the item.

Reimplemented in idlelib.ClassBrowser.MethodBrowserTreeItem, idlelib.ClassBrowser.ClassBrowserTreeItem, idlelib.StackViewer.FrameTreeItem, and idlelib.ClassBrowser.ModuleBrowserTreeItem.

Definition at line 358 of file TreeWidget.py.

00358 
00359     def OnDoubleClick(self):
00360         """Called on a double-click on the item."""
00361 
00362 
00363 # Example application

def idlelib.TreeWidget.TreeItem.SetText (   self,
  text 
) [inherited]
Change the item's text (if it is editable).

Reimplemented in idlelib.TreeWidget.FileTreeItem, and idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 346 of file TreeWidget.py.

00346 
00347     def SetText(self, text):
00348         """Change the item's text (if it is editable)."""


Member Data Documentation

idlelib.TreeWidget.TreeItem.expandable = None [static, inherited]
Do not override!  Called by TreeNode.

Definition at line 322 of file TreeWidget.py.

Definition at line 21 of file StackViewer.py.

Definition at line 22 of file StackViewer.py.

Definition at line 23 of file StackViewer.py.


The documentation for this class was generated from the following file: