[p4python] how to use p4.messages?
Schröder, Marko
marko.schroeder at tui-infotec.com
Mon Feb 4 02:10:02 PST 2013
Hi,
I'd like to get away from parsing the return value of a Perforce command. I'd like to parse instead the p4.messages.
-----------------------
import P4
p4 = P4.P4()
p4.port='3666'
p4.user='sb'
p4.connect()
p4.input='my_password'
p4rc = p4.run('login')
print p4rc
>>>['User sb logged in.']
print p4.messages
>>> []
p4rc = run_sync("-n","-f","//depot/foo/bar.c")
print p4rc
>>> [{'totalFileSize': '49', 'rev': '1', 'totalFileCount': '1', 'clientFile': '/home/sb/p4client/foo/bar.c ', 'fileSize': '49', 'action': ' refreshed', 'depotFile': '//depot/foo/bar.c ', 'change': '1'}]
print p4.messages
>>> []
-----------------------
Probably I totally misunderstood the concept of p4.messages ... therefore any hints are appreciated.
Marko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4python/attachments/20130204/0fb4af66/attachment-0002.html>
More information about the p4python
mailing list