Dumb glob question

wittempj at hotmail.com wittempj at hotmail.com
Mon Feb 7 05:00:46 EST 2005


code like below willprint all files ending on 'par2', except tose not
containong 'vol' from the 5th position. is that what you need?
-import glob
-for nuke in glob.glob(r"""c:\temp\*.par2"""):
-    try:
-        nuke.index('vol', 5)
-        print nuke
-    except ValueError, e:
-        print e




More information about the Python-list mailing list