FW: [p4] jobs reports

Oren Blum orenb at cognitens.com
Sun Jul 15 23:41:26 PDT 2001


Hi,
Do you have any solution in PERL ?

Fastest way: learn a small amount of Python.

        -Jeff Bowles
        Perforce Consulting Partner (normally jab at pobox.com)

#
# save this as "thing.py"  and run using "p4 -G jobs | python thing.py".
# This works for the releases of Perforce that support "p4 -G" (2000.1 and
later)
#
import marshal
import sys
from sys import exit

true = 1

try:
   while true:
        info = marshal.load(sys.stdin)
        print "%12s\t%12s\t%30s" % (info['Job'], info['Status'],
info['Description'])
        # print info.keys()             # uncomment this to see all fields
you can print
except EOFError:
   exit(0)



More information about the perforce-user mailing list