Ok, the first question is an OS related question. What OS do you use ?

For the second, this kind of deamon are usually done using processes rather than threads. This is a lot safer and easier to achieve. I suppose you know how to start a new process. On UNIX, the simplest way to achieve what you want is simply to call os.fork() : all open sockets are available on the child process and you can continue safely the communication with your client.

Pierre

Alberto Troiano a �crit :
Hey
Back again I'm need to make a daemon application and to manage multithreading
The program has to check every 3 seconds if is there images inside one folder
(That's only for you to know what I'm doing in case you needed)
My first problem is that I can imagine a way to do a daemon.How can I make it start with the OS???and How can I bind it to the task bar(where Messenger is)????
The second problem is that I have to start a thread for each user that connects to the app, but I don't understand how to use this. I've read the multithread's archives but I can't crack them.
Suppose I have this function:
def foo():
print hello*30
def foo2():
print bye*30
How can I make this functions to run simoultaneosly using threads?????
That'll help understand
Thanks in advanced
Alberto



------------------------------------------------------------------------

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

-- Pierre Barbier de Reuille

INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde
34398 MONTPELLIER CEDEX 5, France

tel   : (33) 4 67 61 65 77    fax   : (33) 4 67 61 56 68
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to