def pstd ( self , * args , * * kwargs ) : kwargs [ 'file' ] = self . out self . print ( * args , * * kwargs ) sys . stdout . flush ( )
how to overwrite print function python
Console to STDOUT
def pstd(self, *args, **kwargs):
        """ Console to STDOUT """
        kwargs['file'] = self.out
        self.print(*args, **kwargs)
        sys.stdout.flush()