Source Code Management
Bjorn Pettersen
pbjorn at uswest.net
Sun Dec 17 00:10:14 EST 2000
More information about the Python-list mailing list
Sun Dec 17 00:10:14 EST 2000
- Previous message (by thread): Source Code Management
- Next message (by thread): Source Code Management
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks! (The feature seems like it would still require some text parsing in most cases however...) -bjorn gtalvola at my-deja.com wrote: > In article <3A3AA3B7.3AC3F4BF at uswest.net>, > Bjorn Pettersen <pbjorn at uswest.net> wrote: > > Do you have a link to how to get the result in Python > marshalled dictionary > > format? (I looked at the perforce website but couldn't > find anything...) > > > > Here's a snippet from the Perforce mailing list about the feature > (I don't have the original author's name): > > > You can use the -G option to Perforce to cause Perforce to do input > > and output as Python marshalled dictionaries. (This is a new but > > unsupported feature in 2000.1 -- see "p4 help undoc".) > > > > Using this feature it's easy to query Perforce and read the results. > > > > import marshal > > import win32pipe > > stream = win32pipe.popen('p4 -G changes', 'r') > > changes = [] > > try: > > while 1: > > changes.append(marshal.load(stream)) > > except EOFError: > > for c in changes: > > print c['change'], c['desc'] > > > > > > Sent via Deja.com > http://www.deja.com/
- Previous message (by thread): Source Code Management
- Next message (by thread): Source Code Management
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list