mirror of
https://github.com/WallyS02/Song-Lyrics-Generator.git
synced 2024-11-20 09:38:50 +00:00
18 lines
517 B
Python
18 lines
517 B
Python
|
from threading import Thread
|
||
|
|
||
|
|
||
|
class ScrapThread(Thread):
|
||
|
def __init__(self, group=None, target=None, name=None,
|
||
|
args=(), kwargs={}, Verbose=None):
|
||
|
Thread.__init__(self, group, target, name, args, kwargs)
|
||
|
self._return = None
|
||
|
|
||
|
def run(self):
|
||
|
if self._target is not None:
|
||
|
self._return = self._target(*self._args,
|
||
|
**self._kwargs)
|
||
|
|
||
|
def join(self, *args):
|
||
|
Thread.join(self, *args)
|
||
|
return self._return
|