Skip to content
findtools is a pythonic implementation of file search routines inspired by GNU Findutils
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/findtools modified: ../src/findtools/__init__.py Jul 8, 2014
tests
.gitignore
LICENSE
Makefile
README.md
setup.py

README.md

findtools

Findtools is a pythonic implementation of file search routines inspired by GNU Findutils.

from findtools.find_files import (find_files, Match)


# Recursively find all *.sh files in **/usr/bin**
sh_files_pattern = Match(filetype='f', name='*.sh')
found_files = find_files(path='/usr/bin', match=sh_files_pattern)

for found_file in found_files:
	print found_file

The above is equivalent to

find /usr/bin -type f -name '*.sh'

Installation

You can install th library by using PyPI registry, e.g.

pip install findtools

Alternatively you can clone git repository

git clone https://github.com/ewiger/findtools.git findtools && cd findtools sudo python setup.py install
You can’t perform that action at this time.