6 messages in com.perforce.perforce-user[p4] Python mMarshalling problem
FromSent OnAttachments
Smith, Jeff05 Oct 2004 06:58 
Chuck Karish05 Oct 2004 07:34 
Robert Cowham05 Oct 2004 07:40 
Smith, Jeff05 Oct 2004 09:24 
Smith, Jeff05 Oct 2004 09:28 
Chuck Karish05 Oct 2004 10:14 
Subject:[p4] Python mMarshalling problem
From:Smith, Jeff (jsm@medplus.com)
Date:10/05/2004 06:58:57 AM
List:com.perforce.perforce-user

The attached python test script produces interesting results.

When run on our UNIX systems of different flavors, it reports string lines = 1004 marshaled lines = 1004

On our Windows platforms, we get string lines = 1004 marshaled lines = 188

This has been run against Python 2.3.3 and 2.3.4 as well as Perforce 2002.2 and 2004.2

Any input is appreciated, Jeff Smith

import os import marshal

slines = list() for line in os.popen('p4 labels'): slines.append(line)

mstream = os.popen('p4 -G labels') mlines = list() while 1: try: item = marshal.load(mstream) mlines.append(item) except EOFError: break

print 'string lines = ' + str(len(slines)) print 'marshaled lines = ' + str(len(mlines))