Editra  0.7.08
Editra API Documentation
 All Classes Namespaces Functions Variables Properties
Classes | Functions | Variables
Editra::src::dev_tool Namespace Reference

Classes

class  LogMsg
 LogMsg is a container class for representing log messages. More...
class  EdLogFile
 Transient log file object. More...
class  EdErrorDialog
 Error reporter dialog. More...

Functions

def DEBUGP
 Prints debug messages and broadcasts them on the log message channel.
def DecodeString
 Decode the given string to Unicode using the provided encoding or the DEFAULT_ENCODING if None is provided.
def ExceptionHook
 Handler for all unhandled exceptions.

Variables

string __author__ = "Cody Precord <cprecord@editra.org>"
 Editra Development Tools Tools and Utilities for debugging and helping with development of Editra.
string __svnid__ = "$Id: dev_tool.py 67571 2011-04-22 01:10:57Z CJP $"
string __revision__ = "$Revision: 67571 $"
 _ = wx.GetTranslation
tuple RE_LOG_LBL = re.compile(r"\[(.+?)\]")
tuple DEFAULT_ENCODING = locale.getpreferredencoding()
string PYTHONW = 'pythonw'

Function Documentation

def Editra.src.dev_tool.DEBUGP (   statement)

Prints debug messages and broadcasts them on the log message channel.

Subscribing a listener with any of the EDMSG_LOG_* types will recieve its messages from this method.

1. Formatting

  • [object/module name][msg_type] message string

2. Message Type:

  • [err] : Notes an exception or error condition (high priority)
  • [warn] : Notes a error that is not severe (medium priority)
  • [info] : General information message (normal priority)
  • [evt] : Event related message (normal priority)

Example: >>> DEBUGP("[ed_main][err] File failed to open")

Parameters:
statementShould be a formatted string that starts with two identifier blocks. The first is used to indicate the source of the message and is used as the primary means of filtering. The second block is the type of message, this is used to indicate the priority of the message and is used as the secondary means of filtering.
def Editra.src.dev_tool.DecodeString (   string,
  encoding = None 
)

Decode the given string to Unicode using the provided encoding or the DEFAULT_ENCODING if None is provided.

Parameters:
stringstring to decode
encodingencoding to decode string with
def Editra.src.dev_tool.ExceptionHook (   exctype,
  value,
  trace 
)

Handler for all unhandled exceptions.

Parameters:
exctypeException Type
valueError Value
traceTrace back info

Variable Documentation

_ = wx.GetTranslation
string __author__ = "Cody Precord <cprecord@editra.org>"

Editra Development Tools Tools and Utilities for debugging and helping with development of Editra.

Utility function for debugging the editor

string __revision__ = "$Revision: 67571 $"
string __svnid__ = "$Id: dev_tool.py 67571 2011-04-22 01:10:57Z CJP $"
string DEFAULT_ENCODING = locale.getpreferredencoding()
string PYTHONW = 'pythonw'
tuple RE_LOG_LBL = re.compile(r"\[(.+?)\]")
 All Classes Namespaces Functions Variables Properties