FInd files with .so extension

rishi pathak mailmaverick666 at gmail.com
Thu May 3 02:10:16 EDT 2007


May be this would work
import os
grep="so"
dir="."
lst = os.listdir(dir)
filelst=[]
for i in lst:
        if i.split(".")[len(i.split("."))-1] == grep:
        lst.append(i)
print lst


On 2 May 2007 21:58:41 -0700, pradeep nair <deepns7 at gmail.com> wrote:
>
> HI,
>
>
>      How do i find files with .so extension using python .
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Regards--
Rishi Pathak
National PARAM Supercomputing Facility
Center for Development of Advanced Computing(C-DAC)
Pune University Campus,Ganesh Khind Road
Pune-Maharastra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070503/1ff1efec/attachment.html>


More information about the Python-list mailing list