Two modules support the usage of threads in Python:
The module thread treats a thread as a function, while the module threading is implemented in an object oriented way, i.e. every thread corresponds to an object.
Due to the Global Interpreter Lock, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome this limitation). If you want your application to make better use of the computational resources of multi-core machines, you are advised to use multiprocessing. However, threading is still an appropriate model if you want to run multiple I/O-bound tasks simultaneously.
!