Perforce p4c.run("print" error - AttributeError: OutputBinary

kbperry keith.b.perry at gmail.com
Tue Mar 28 12:48:42 EST 2006


I received a response from Robert Cowham ( the author of the API):

The problem is that something like print was only expected to be done
for text files not binary.

You could try editing p4.py and add a method similar to:

    def OutputText(self, text):
        "Adds text lines to the output data."
        for line in string.split(text, '\n'):
            self.output.append(line)

e.g. around line 214 add

    def OutputBinary(self, text):
        "Adds lines to the output data."
        self.output.append(text)


Note:  I am sure that Robert will be updating the P4 module for python,
so if you can I would just download the most recent version (I would
give him a couple of days though).




More information about the Python-list mailing list