Hi everyone,

I just wan't to share a very simple example of python script that can
help generating a random playlist from a specific folder. I am using
glob library that is very powerful because of the possibility of using
wildcards.

I call it in liquid script:

teste = request.dynamic({ request.create("bar:foo", indicators=
get_process_lines("python list.py"))})


The python list.py script:

import os;
import glob;
import random;

lista = glob.glob('/home/radio/samba/*.mp3')


random.shuffle(lista)

for arquivo in lista:
  print arquivo



Please share any corrections or a more elegant way to do this.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to