Package node_manager_fkie :: Package editor :: Module text_search_thread :: Class TextSearchThread
[frames] | no frames]

Class TextSearchThread

source code

python_qt_binding.QtCore.QObject --+
                                   |
                  object --+       |
                           |       |
          threading._Verbose --+   |
                               |   |
                threading.Thread --+
                                   |
                                  TextSearchThread

A thread to search recursive for a text in files.

Instance Methods
 
__init__(self, search_text, path, is_regex=False, path_text={}, recursive=False)
:param search_text: text to search for :type search_text: str :param path: initial file path :type path: str .param is_regex: is the search_text a regular expressions :type is_regex: bool
source code
 
stop(self) source code
 
run(self)
Method representing the thread's activity.
source code
[str, ...]
search(self, search_text, path, recursive=False)
Searches for given text in this document and all included files.
source code

Inherited from threading.Thread: __repr__, daemon, getName, ident, isAlive, isDaemon, is_alive, join, name, setDaemon, setName, start

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  warning_signal = Signal(str)
Instance Variables
  search_result_signal = Signal(str, bool, str, int, int, str)
A signal emitted after search_threaded was started.
Properties

Inherited from object: __class__

Method Details

__init__(self, search_text, path, is_regex=False, path_text={}, recursive=False)
(Constructor)

source code 

:param search_text: text to search for :type search_text: str :param path: initial file path :type path: str .param is_regex: is the search_text a regular expressions :type is_regex: bool

Overrides: object.__init__

run(self)

source code 

Method representing the thread's activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object's constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

Overrides: threading.Thread.run

search(self, search_text, path, recursive=False)

source code 

Searches for given text in this document and all included files.

Parameters:
  • search_text (str) - text to find
Returns: [str, ...]
the list with all files contain the text

Instance Variable Details

search_result_signal

A signal emitted after search_threaded was started. (search text, found or not, file, position in text, line number, line text) for each result a signal will be emitted.
Value:
Signal(str, bool, str, int, int, str)