import marshal,os, pprint,sys from readp4marshal import runp4cmd # Task: determine which client specs have the # option 'nocompress'set. # # status: tested on Win/2000 using python 2.0 # num of calls to 'p4': 1 # room for optimization/improvement: add getopts call # # Copyright 2004 Perforce Corporation, Inc. All rights reserved. clientList = runp4cmd("p4 -G clients") for c in clientList: optionList = c['Options'].split(' ') for o in optionList: if o == 'compress': print "%s: compression of data (default)" % c['client'] if o == 'nocompress': print "%s: *no* compression of data" % c['client']