On 28 elo, 13:20, GHZ <[EMAIL PROTECTED]> wrote:

>
> is there a shortcut I'm missing?

(Adding to Bruno's comment)

This kind of style provides a reusable filter/generator-function and
as a bonus, the for-loop becomes easier to understand.

from os.path import abspath
from glob import iglob

def ipathnames(pattern):
    return (abspath(n) for n in iglob(pattern))

for xmlfile in ipathnames('*.xml'):
    <do something>

-- timo
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to