I would like my python script to search through a directory in SVN, locate the files ending with a particular extension (eg. *.exe), and copy these files to a directory that has been created in my C drive. How can I do this? I’m new to Python so a detailed response and/or point in the right direction would be very much appreciated.
Follow-up: When using os.walk what parameter would I pass in to ensure that I’m copying files with a specific extension (eg. *.exe)?
I think it is easiest to check out (or, better, export) the source tree using the svn command line utility: you can use os.system to invoke it. There are also direct Python-to-svn API bindings, but I would advise against using them if you are new to Python.
You can then traverse the checkout folder, e.g. using os.walk; the copying itself can be done with shutil.copy.