[p4python] API issue with p4 print

Eric Huss e-huss at netmeridian.com
Tue Jun 3 16:35:49 PDT 2008

On Tue, 3 Jun 2008, Smith, Jeff wrote:

> Python: 2.5.1
> P4Python: Windows 1.1
> I have a file with a very long line (>10,000 characters).  When I
> perform a p4 print on this file at the command line, the file comes out
> properly.  However, when I use p4client.run('print', file) then the long
> line has extra return characters placed randomly in it.
> Anyone seen this or is there a way around this problem?

I brought up a similar issue about a year ago:


Here was my hackish workaround:

class MyP4H(p4.P4ClientHandler):

    def OutputInfo(self, data, level):

    def OutputText(self, text):

class MyP4(p4.P4):

    def __init__(self):
        self.p4client = MyP4H()


More information about the p4python mailing list