mlpy.tools.misc.Waiting¶
-
class
mlpy.tools.misc.
Waiting
(text=None)[source]¶ Bases:
threading.Thread
The waiting class.
The waiting class prints dots (.) on stdout to indicate that a process is running. The waiting process runs on a different thread to not disturbed the running process.
Examples
>>> def long_process(): ... for i in xrange(20): ... pass ... >>> w = Waiting("processing") >>> >>> w.start() >>> long_process() >>> w.stop() processing ......
Attributes
daemon
A boolean value indicating whether this thread is a daemon thread (True) or not (False). ident
Thread identifier of this thread or None if it has not been started. name
A string used for identification purposes only. Methods
getName
()isAlive
()Return whether the thread is alive. isDaemon
()is_alive
()Return whether the thread is alive. join
([timeout])Wait until the thread terminates. run
()Run the process. setDaemon
(daemonic)setName
(name)start
()Start the process. stop
()End the process.