Package: python-perforce
Pure python perforce APIFree software: MIT licenseDocumentation:https://python-perforce.readthedocs.org.FeaturesPythonic api to PerforcePure python, no compiled extensionInstallationpip install python-perforceUsage>>> import perforce
>>> p4 = perforce.connect()
>>> revisions = p4.ls('//depot/path/to/file.txt')
>>> print(revisions)
[<Revision 1: file.txt>]
>>> p4.ls('//depot/path/....txt')
[<Revision 1: file.txt>, <Revision 2: foo.txt>]
>>> cl = p4.findChangelist('my description')
>>> with cl:
...     cl.append(revisions[0])
...     p4.add('path/to/add.txt', cl)
>>> cl.description
'my description'
>>> cl.description = 'something else'
>>> cl.submit()
>>> client = perforce.Client('my_client')
>>> print(client.stream)
//streams/main
>>> print(client.root)
Path(/path/to/root)History0.3.17 (2016-7-28)Fixed bug with windows dependent line breaks Fixes #34Fixed bug while parsing unicode Fixes #320.3.16 (2016-5-6)Fixed bug with non-unicode characters Fixes #32Fixed bug with spaces in a file spec for Client and Stream Fixes #29Fixed bug if any of the P4 variables were set to an empty string in a config file0.3.15 (2016-3-9)Python 3 support0.3.14 (2016-2-24)Fixed bug when trying to add an empty file0.3.13 (2016-2-17)Changed the parameter in __getVariables to a list Fixes #270.3.12 (2016-2-16)Added an optional connection paramter to all api functions0.3.11 (2016-2-16)Added a base class for perforce objects to wrap dict getterAdded Stream object Fixes #25Added tests for new classes Fixes #26Added tests for Revision objects as it was lacking__getVariables will no longer show a console on windows Fixes #24Client and Stream are now exposed at the package level Fixes #230.3.10 (2016-1-30)Added Client objectAdded better support for finding p4 env variablesAdded PendingDeprecationWarnings to Changelist and Revision to accept an optional Connection object.  If not provided, it will use whatever settings it can find to create oneFor Changelist, Revision, and Client, added __getattr__ to use the underlying dict to allow use of all fields if not directly supported by this libConnection.run() now requires a list instead of a string for the command.  A PendingDeprecationWarning will be thrown if a string is used.  Strings will not be supported in 0.4.00.3.9 (2016-1-29)Changelist objects are lazy and will only query files as needed0.3.7 (2015-1-7)Fixed bugs regarding spaces in file names or specsFixed bug that may have left too many file handles openAdded comparison operator to Changelist0.3.6 (2015-12-3)Added __iadd_ operator to ChangelistAdded unchanged_only flag to Changelist.revert()Added exclude_deleted flag to Connection.ls()Fixed a bug on windows that would occur if the command line was too long (>8190)Added setter to Connection.clientChangelist.append will now raise a RevisionError if the file to append is not under the clients root0.3.5 (2015-11-18)Changed the argument order for Revisions to be consistent with everything else.  Supports backwards compatible argument ordersFixed bug that would attempt to checkout files when querying a changelist0.3.4 (2015-11-17)Changed enums to be namedtuplesFixed bug when detecting login state0.3.3 (2015-11-16)Corrected the way the error levels were being handledAdded more documentationConnection will no longer fail if any of the paramter were incorrect, use Connection.status() to check the status of the connection0.1.0 (2014-10-16)First release on PyPI.