[p4] Using the -G option with Python

Michael Malloy Mike at KnowNow.com
Tue Oct 9 11:06:00 PDT 2001

Does anyone have any code that uses the -G option while running p4
command within Python?  I am confused by this module and can't seem to
find any good examples.  Here are something I have tried:

output = os.popen('p4 -G sync -f ...').read()

The problem is that this only gives me the first file that was sync'ed,
as far as I can tell.  Subsequent calls to loads() give the same result.
Am I missing something?  I know that about 20 files are refreshed with
this command.

I am using this method because I need a script that will work
cross-platform.  If you know of an easier way to do this in Python, I
would be very interested.

Any help is greatly appreciated.

Mike Malloy

More information about the perforce-user mailing list