{{Project|P4Python Library| curator=Sven Erik Knop| path=//guest/sven_erik_knop/perforce/P4Rubylib/...| language=Python| license=PPL| brief=Library of P4Python scripts and triggers}} [[Category:Perforce administrative tools]] [[Category:Perforce APIs]] [[Category:Python]] == Introduction== Here are a set of scripts and triggers written in P4Python. All of these scripts require you to install [http://www.python.org Python] and [ftp://ftp.perforce.com/perforce P4Python] == Support == If you have any problems or questions with these scripts you can contact me at [mailto:sknop@perforce.com sknop@perforce.com]. These scripts are not supported by Perforce Software, but by me personally. I'll answer questions as quickly as I can. == Triggers == These are some example trigger scripts. The documentation for all of these scripts will be available [http://public.perforce.com/guest/sven_erik_knop/perforce/P4Pythonlib/triggers/doc/index.html here]. {| class="TablePager" ! colspan="2"|Common Files |- |[http://public.perforce.com/guest/sven_erik_knop/P4Pythonlib/triggers/P4Triggers.py P4Triggers.py] |A generalised framework for implementing Perforce submit triggers used by all of the other scripts. If you're going to use these scripts at all, you'll need this file to be installed in the same directory as the scripts themselves. |- |[http://public.perforce.com/guest/sven_erik_knop/P4Pythonlib/triggers/CheckCaseTrigger.py CheckCaseTrigger.py] |Script to ensure that new files being added/branched respect the case of existing directories in the path. For example, if //depot/test/fileA already exists, then this script will reject an attempt to add //depot/TEST/fileB or //depot/test/FILEa for that matter. The trigger is Unicode aware and will deal with Unicode enable Perforce servers. This is very useful if you have Windows clients or if your Perforce server runs on Windows. In an all Unix environment it's not so much of a problem. |- |[http://public.perforce.com/guest/sven_erik_knop/P4Pythonlib/triggers/ChangeTypeCheckTrigger.py ChangeTypeCheckTrigger.py] |Script to ensure that file types cannot be accidentally changed to +S. |} == General Purpose Scripts == These are some useful non-trigger scripts {| class="TablePager" |[http://public.perforce.com/guest/sven_erik_knop/P4Pythonlib/scripts/ClientChecker.py ClientChecker.py] |A script to print out all clients with their age and the amount of storage they waste on the server. |- |[http://public.perforce.com/guest/sven_erik_knop/P4Pythonlib/scripts/SplitVerify.py SplitVerify.py] |A simple script to split the verify into several stages. |} == Additional Information == {{RecentChanges|//guest/sven_erik_knop/P4Pythonlib/...}} {{License|PPL|2007-2009|Perforce Software, Inc}}