G
grocery_stocker
Given the following code...
#!/usr/bin/env python
import time
import thread
def myfunction(string,sleeptime,*args):
while 1:
print string
time.sleep(sleeptime) #sleep for a specified amount of time.
if __name__=="__main__":
thread.start_new_thread(myfunction,("Thread No:1",2))
while 1ass
Taken from following URL....
http://linuxgazette.net/107/pai.html
How can myfunction() extract the tuple ("Thread No:1",2) from
start_new_thread() if myfunction is only being passed the single arg
("Thread No:1",2)
#!/usr/bin/env python
import time
import thread
def myfunction(string,sleeptime,*args):
while 1:
print string
time.sleep(sleeptime) #sleep for a specified amount of time.
if __name__=="__main__":
thread.start_new_thread(myfunction,("Thread No:1",2))
while 1ass
Taken from following URL....
http://linuxgazette.net/107/pai.html
How can myfunction() extract the tuple ("Thread No:1",2) from
start_new_thread() if myfunction is only being passed the single arg
("Thread No:1",2)