#
# BusyB, an automated build utility.
#
# Copyright (C) 1997-2005
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# Stream which writes to a string
#
class MemoryFile:
def __init__(self):
self.buffer=''
def close(self):
pass
def write(self, str):
self.buffer = self.buffer + str
def flush(self):
pass
def paragraph(self):
self.write('\n')
def startQuote(self):
pass
def endQuote(self):
pass
def writeln( self, str='' ):
self.write( str )
self.write( "\n" )
def writeFileRef( self, text, file ):
self.write( text )
self.write( "[" + file + "]" )
def rule(self):
self.f.write( "---------------------------\n" )
def startTable(self, percentSize=100, border=1):
pass
def endTable(self):
pass
def startRow( self ):
pass
def endRow( self ):
pass
def startCell( self, width=None ):
pass
def endCell( self ):
pass
def startFontColor( self, color ):
pass
def endFontColor( self ):
pass
def timeStamp(self, msg=None):
self.writeln( msg )
def getText(self):
return self.buffer
|