[PD] [PD-announce] more objects from libc: stat - get file info
Tim Blechmann
TimBlechmann at gmx.net
Wed Jun 14 15:20:45 CEST 2006
On Wed, 2006-06-14 at 07:27 -0500, chris clepper wrote:
> Is there a way to get a random file of a certain type (like .mov) from
> a specific directory using your objects?
would this python one-liner be an option for you?
import random, glob
def choose(path):
return random.choice(glob.glob(path+"/*.mov"))
t
--
tim at klingt.org ICQ: 96771783
http://www.mokabar.tk
Life is really simple, but we insist on making it complicated.
Confucius
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060614/8b15a429/attachment.pgp>
More information about the Pd-list
mailing list