I have this method in my class called "interaction":
class Interaction:
def PreparaThreadBrowser(self, User, Password):
t = ThreadBrowser(args=(User, Password), )
t.start()
that ivokes a thread with User and Pass as parameters.
Then I have the class called "ThreadBrowser" with this "run" method:
class ThreadBrowser(threading.Thread):
def run (self, user, password):
self.User = user
self.Pass = password
print(self.User, self.Pass)
but it turns out that I'm certainly struggling sending the arguments to the thread function because it gives an execution error:
TypeError: run() missing 2 required positional arguments: 'user' and 'password'
Any idea how to solve this ?
ThreadBrowser.run()?Thread.runis automatically invoked byThread.start.