Thanks - turns out the real error was in the file dealing with it - all
fixed now.

Thanks for the help.


-----Original Message-----
From: Jim Abramson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 31, 2005 2:38 PM
To: Kate Legere; Zope
Subject: RE: [Zope] python question

sort() on a sequence does not return anything.  It operates on the
[mutable] sequence in place.

You probably want to push this bit into a python script where you have
more elbow room, and do this:

return files[0]


> -----Original Message-----
> Behalf Of Kate Legere
> Sent: Tuesday, May 31, 2005 3:35 PM
> To: Zope
> Subject: [Zope] python question
> I may be asking this in the wrong place but I have a tal page 
> where I want to use python to display only the most recent 
> addition to a folder of files.
> I can sort the folder and return all the files easily with:
>  return sequence.sort(files, (('bobobase_modification_time', 'cmp',
> 'desc'),))
> How do I return just the most recent one? (I tried sorting 
> and then using return max(files) but that doesn't give me all 
> the properties and I need them for display) 
> Kate
> _______________________________________________
> Zope maillist  -
> **   No cross posts or HTML encoding!  **
> (Related lists -
> )

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to