[Pythonmac-SIG] Newbie needs Clues

Chris Barker cbarker@jps.net
Fri, 23 Mar 2001 09:30:31 -0800


You didn't ask this, but if you are going to have your Python program
running on the Linux box monitoring the directory constantly, you will
want to have it running as a "deamon". Look in the archives of
comp.lang.python, this topic has been discussed. IF you have your script
runing regularly, in a loop, constantly looking for new files in the
folder, it will eat up a LOT of CPU, even though it is mostly doing
nothing.


Jack Jansen wrote:
> - If you have control over the Mac side (i.e. because people use a
> program of yours or an applescript to drop the file in the shared
> folder) you could do the copy to a different filename ("tmp.NNNNN")
> and then move that file to the final name when it's done. Then just
> skip the tmp. files on the server side.

If you are doing this (using a custom program to copy the files from the
Mac to the Linux box) then you could also have your custom program start
up the Python script on the Linux box, after you have copied the file
(you would want to use rsh, or ssh, or something like that). This would
solve both the problem of knowing when the copy was finished, and also
the running as a deamon issue.

-Chris


-- 
Christopher Barker,
Ph.D.                                                           
cbarker@jps.net                      ---           ---           ---
http://www.jps.net/cbarker          -----@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Water Resources Engineering       ------   @    ------   @   ------   @
Coastal and Fluvial Hydrodynamics -------      ---------     --------    
------------------------------------------------------------------------
------------------------------------------------------------------------