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

Class TextSearchThread

source code

       object --+            
                |            
sip.simplewrapper --+        
                    |        
          sip.wrapper --+    
                        |    
     PyQt5.QtCore.QObject --+
                            |
           object --+       |
                    |       |
   threading._Verbose --+   |
                        |   |
         threading.Thread --+
                            |
                           TextSearchThread

A thread to search recursive for a text in files.

Instance Methods
 
warning_signal(...) source code
 
__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 PyQt5.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, objectNameChanged, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr

Inherited from sip.simplewrapper: __new__

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

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

Class Variables

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Instance Variables
 
search_result_signal(...)
A signal emitted after search_threaded was started.
source code
Properties

Inherited from threading.Thread: daemon, ident, name

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(...)

source code 
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.