Gustavo Sverzut Barbieri wrote:
> using item.gettattr( b ) you get a string... if you want to know how
> many items you have in a playlist you will get how many chars have in
> the text represention of that array.
>
> Also, I didn't understand this code:
> elif b[:4] == 'len(' and b.find(')') > 0 and \
> len(b) - b.find(')') < 5:
> exp += ' item.getattr("%s") %s' % \
> (b[:b.find(')')+1], \
> b[b.find(')')+1:])
>
> why the clause: len(b) - b.find(')') < 5 ?
because I want to prevent something like
'len(b) > os.system(rm -rf ~)'
That's the reason why I only want to allow 'and', 'or', 'not' and
len(x)[>|==][0-9]. BTW, I will move that exp building into the xml
file to calculate this only once.
> also, how you get the length using that? :)
I hope I checked in a modified item.py. Then you send
item.getattr('len(playlist)') and getattr has a special handler for
len().
>> Yes, getattr(a) is the way to go. It searches for item.a and for
>> item.info[a]. Every item has this function.
>
> Ok, but how to workaround the problem of len()?
I hope it works for you now.
Dischi
--
Hard work often pays off after time. But laziness always pays off now.
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel