What is print? A function?

Philippe C. Martin philippecmartin at sbcglobal.net
Mon Jan 24 11:49:11 EST 2005


Why don't you redirect stdout or stderr


#*******************************************************************************
class Debug_Stderr:
  __m_text = ''
  __m_log_text = None
  __m_dbg = None
  __m_refresh_count = 0
#*******************************************************************************
  def __init__(self):
#*******************************************************************************
  def write(self,p_string):
     #your code here




.
.
.
my_debug = Debug_Stderr()
sys.stderr = my_debug

print >> sys.stderr, 'this will go into the above write method'





-- 
***************************
Philippe C. Martin
SnakeCard LLC
www.snakecard.com
***************************




More information about the Python-list mailing list