[Mailman-Developers] re: Much cpu/memory load

Barry A. Warsaw barry@python.org
Mon Nov 4 18:27:54 2002


>>>>> "DM" == Dan Mick <dan.mick@sun.com> writes:

    DM> Sigh.  This isn't making life any easier trying to debug the
    DM> "Archiver eats my machine" problem:

    DM>          self._open_index_file_as_stdout(arcdir, hdr)

    DM> Any tricks for using pdb with a program that wants to steal
    DM> stdout?

Rewrite the code so it doesn't steal stdout? ;)

Really, this code should be rewritten to use more modern Pythonic
style, such as

    def _open_index_file(self, archdir, index_name):
        # ...
	# remove the sys.stdout hackery

and then any place that does "print something_useful" should get
rewritten as "print >> self.__f, something_useful".

I don't have time for that, but I'd accept a patch.

-Barry