3 messages in com.perforce.p4python[p4python] Possible to show sync outp...| From | Sent On | Attachments |
|---|---|---|
| John Burk | 22 Dec 2005 13:03 | |
| Robert Cowham | 22 Dec 2005 15:36 | |
| John Burk | 22 Dec 2005 17:13 |
| Subject: | [p4python] Possible to show sync output as it's happening, instead of returning it?![]() |
|---|---|
| From: | Robert Cowham (rob...@vaccaperna.co.uk) |
| Date: | 12/22/2005 03:36:56 PM |
| List: | com.perforce.p4python |
How keen are you to dive into the depths of the code?!
You could customise p4.py and override method:
class P4ClientHandler: def OutputInfo(self, data, level): "Parse the given data, adding it to self data." for line in string.split(data, '\n'): self.output.append(line)
And just print it instead of saving it...
Robert
-----Original Message----- From: p4python-bounces at perforce.com [mailto:p4python-bounces at perforce.com] On Behalf Of John Burk Sent: 22 December 2005 21:04 To: p4python at perforce.com Subject: [p4python] Possible to show sync output as it's happening,instead of returning it?
Quite a few of the scripts that end users run involve a sync performed like so:
print p4c.run_sync( filePath )
I have users who don't sync for quite a while and the depot is ~huge~ (sound for a video game, >2GB), and when they do, are fairly disconcerted when they don't see any output for several minutes; run_sync doesn't return anything until _after_ the sync is finished, which can be up to 15 minutes.
They think something's hung, and usually kill and re-start the process. I could add a 'please wait', but I'm never sure how patient they're going to be...
Is there any way to get the p4.run() method to print to stdout as it's running, instead of collecting all the output and returning it?
John Burk | Radical Entertainment | 604.601.6970 | jburk at radical.ca ?
_______________________________________________ p4python mailing list p4python at maillist.perforce.com http://maillist.perforce.com/mailman/listinfo/p4python




