py_everything.search¶
Source code: py_everything/search.py
This module deals with search operations, like files, lists, etc.
- py_everything.search.searchFiles(keyword, path)¶
Searches
pathfor files matching withkeyword.- Parameters
keyword (str) – Word to match files with
path (str) – Full path to directory to search in
- Returns list
List of matches
- py_everything.search.searchDirs(keyword, path)¶
Searches
pathfor directories matching withkeyword.- Parameters
keyword (str) – Word to match directories with
path (str) – Full path to directory to search in
- Returns list
List of matches
- py_everything.search.searchExts(keyword, path)¶
Searches
pathfor file extensions matching withkeyword.- Parameters
keyword (str) – Extension to match file extensions with
path (str) – Full path to directory to search in
- Returns list
List of matches
- py_everything.search.searchList(listOfTerms, query, filter='in)¶
Searches
listOfTermsfor terms matching withquery.- Parameters
listOfTerms (str) – List to search in
query (str) – Word to verify matches with
filter – Specify way if searching. Choices - ‘in’, ‘start’, ‘end’, ‘exact’.
- Returns list
List of matches
Note
filteris set to ‘in’ by default. ‘in’ - Checks ifqueryis in term. ‘start’ - Checks if term starts withquery. ‘end’ - Checks if term ends withquery. ‘exact’ - Checks if term ==query.