[p4python] Stay connected or disconnect and reconnect

Wright, Richard richardw at cobaltgroup.com
Wed Oct 19 12:29:18 PDT 2005

This question is probably more about the API than P4Python specifically, but
P4Python is how I'm accessing the API, and there is a non-zero chance that
the answer could be different for P4Python than for the general API.
Anyway, I am working on a program that runs Perforce commands based on user
input.  It is possible that this program could be running for hours (or
days, even) sitting idly waiting for the user to instruct Perforce to do
something.  (Imagine an application like P4V which may stay open on a user's
machine for an extended period of time)
The question is:  Should the program run a single p4.connect() when the
program starts, and then a p4.disconnect() when it ends, or would it be
better to disconnect during the idle periods and reconnect as necessary?

Rick Wright
CM/Build Engineer
The Cobalt Group, Inc.
2200 First Avenue South
Seattle, WA 98134
richardw at cobaltgroup.com <mailto:richardw at cobaltgroup.com> 

p. 206.219.8382

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4python/attachments/20051019/2dcc9e38/attachment-0001.html>

More information about the p4python mailing list