[Tutor] Allow only one instance of a process

Vince Spicer vinces1979 at gmail.com
Sun May 17 05:26:31 CEST 2009

simple solution would be to create a lock file before processing, 

lock = open("videoname.lck")

On Saturday 16 May 2009 8:26:31 pm Sylvain Ste-Marie wrote:
> I'm currently writing a script to batch convert video for my psp
> It basically looks into a folder for video and launch ffmpeg:
> ffmpeg -i "videoname" -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s
> 368x208 "videoname.mp4"
> my idea is basically to check for pid but how do i do that?
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090516/cd61eddf/attachment.htm>

More information about the Tutor mailing list