Affecter une liste de thread dans une liste
Bonjour,
Je n'arrive pas à affecter des threads dans une liste comme dans l'exemple suivant, le compilateur m'indique toujours une erreur :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Class maClass :
def __init__(self):
def mafunction (self):
maliste=()
for i n range(3) :
maliste(i)=thread1()
Class thread1((threading.Thread)):
def __init__(self):
def run(run):
print("ok") |
Comment pourrai-je affecter les threads dans une boucle ?
Merci d'avance.
Affecter une liste de thread dans une liste
This my real code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Class Mccc:
def init(self, serialno) :
self.serialno=serialno
def group_call(self,reception_check ,*args) :
FU_reception_check=[]
for i in range(4):
thread_reception(i)=FU_reception_check(str(reception_check),args[i])
Class FU_reception_check(threading.Thread):
def__init__self(granted_user_id, sn):
threading.Thread.__init__(self)
self.granted_user_id=granted_user_id
self.sn=sn
self.lock=lock=threading.Lock()
self.lock.acquire()
def run(self):
receive=Mccc(self.sn)
self.lock.release() |
When I call my function on ROBOTFRAMEWORK like this :
@{SN_LIST} FADZEF234R34RG gf24EF34fAZDFAE FAZEFFAEZFZ GZRRFVSERSDVSZ f2EFZFDCZE
Robot -t Group Call azerty @{SN_LIST}
I have this error : "failed : SyntaxError : can't assign to function call"