[p4python] Output of p4 print chunked into array?

Geoff Nicol gnicol at perforce.com
Thu Nov 6 14:12:07 PST 2014


Its not a particularly helpful observation but p4-php behaves the same way;
I think its a fundamental part of p4.

Its useful in its own way as you can use an output handler to deal with
large files being printed 4k at a time.

It is surprising though the first time you figure it out.

-Geoff

On Thu, Nov 6, 2014 at 1:46 PM, Jan Van Uytven <juytven at perforce.com> wrote:

>
> I have a user who's a bit confused as to why the output of 'p4 print'
> (when run as p4.run_print("-q", "some_file")) returns an array with the
> contents of the file 'chunked' into 4096-byte segments.
>
> He points out that this isn't documented, and as far as I can tell, he's
> right.  Is there a particular reason why P4Python does this?
>
> (I'd check p4prod, but I can't seem to access it atm)
>
> - Jan
>
> --
> Jan Van Uytven
>
> Everything(Nothing) is true -
>    Everything is permissible!
>    - Hassan i Sabbah
> _______________________________________________
> p4python mailing list
> p4python at perforce.com
> http://maillist.perforce.com/mailman/listinfo/p4python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4python/attachments/20141106/11c5e4e1/attachment-0002.html>


More information about the p4python mailing list