

You may be able to identify candidate locations fairly efficiently by guessing. Once you have a result, you can verify it is correct relatively quickly. The thing about searching is that it doesn't matter too much how you get there (eg cheating). I had naively though I could get the 5000 odd directory names and search these for 'rawtherapee' then use os.walk to traverse those directories but all modules and functions I have looked at collate all files in the directory (again).Īnyone have a quicker method of searching the entire directory tree or am I stuck with this hybrid option? Usually 'AboutThisBuild.txt' is stored in a directory/subdirectory called 'rawtherapee' or has the string somewhere in the directory tree. # Return the first instance of RT found in the paths searchedįor root, dirs, files in os.walk(CheckPath, True, None, False):įor filename in fnmatch.filter(files, pattern): RootPath = ('/usr/share/doc/rawtherapee',
Using rawtherapee on ssd windows#
Tested on Linux but not Windows as yet as I am still researching where the file might be placed.

This is quicker but has the obvious disadvantage of missing some files. To reduce load I have tried to predict likely hiding places and only traverse these. Searching the entire directory tree is like watching paint dry! The main one is using os.walk and fnmatch. I have tried a variety of methods, some suggested elsewhere on this site. By having the version number, revision number and changeset (AKA Mercurial), I can sort out why the script may not be working as expected. My plug-in is being designed to collect basic system data when run without any command line parameters for the purpose of short circuiting troubleshooting. Although RawTherapee knows where it is installed this data is baked into the binary file. RawTherapee uses an embedded copy of the DCRAW utility to read and decode the RAW file (original source code). I need to extract the version number from a file called 'AboutThisBuild.txt' that may exist anywhere in the directory tree. I am writing a plug-in for RawTherapee in Python.
