OK. Mercy Pierre for the reply(It's my french correct???? :)
The OS will be Linux AS 3.0 and it will be good to know for Windows 2000 and newer also
I don't understand about the processes (I mean I do but I don't know how to code it)
This is the application:
An IP Camera will send images to the server via ftp to a folder. Each user has a folder and I want to know how I can make my app to check the folders ('cause there is going to be many cameras sending files and that means that the app will have to check every folder) every x seconds?
Will I have to make one process for every user or one for each user??????
How do I achieve this??????
Thanks
Alberto
![]()
Gaucho
>From: Pierre Barbier de Reuille <[EMAIL PROTECTED]> >To: Alberto Troiano <[EMAIL PROTECTED]>, Python Tutor <
[email protected]> >Subject: Re: [Tutor] Multithreading and Daemon Program >Date: Wed, 13 Apr 2005 15:51:19 +0200 > >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