[PD] [PD-announce] more objects from libc: stat - get file info

chris clepper cgc at humboldtblvd.com
Wed Jun 14 17:13:54 CEST 2006


On 6/14/06, Tim Blechmann <TimBlechmann at gmx.net> wrote:
> 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"))

It would if I knew any python!  I'll see if I can figure out how to
get that working inside Pd and also how the script works (seems really
simple).

Thanks
cgc




More information about the Pd-list mailing list