Re: FInd files with .so extension

2007-05-03 Thread mailme . gurpreet
On May 3, 9:58 am, pradeep nair <[EMAIL PROTECTED]> wrote: > HI, > > How do i find files with .so extension using python . Hi pradeep This piece of code should help you import os,re def findfile(filepattern, base = '.'): regex = re.compile(filepattern)

Re: FInd files with .so extension

2007-05-02 Thread pradeep nair
.")[len(i.split("."))-1] == grep: > > > lst.append(i) > > > print lst > > > > On 2 May 2007 21:58:41 -0700, pradeep nair <[EMAIL PROTECTED]> wrote: > > > > HI, > > > > > How do i find files with .so extension

Re: FInd files with .so extension

2007-05-02 Thread kaens
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 > > > > > &

Re: FInd files with .so extension

2007-05-02 Thread rishi pathak
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 <[EMAIL PROTECTED]> wr

Re: FInd files with .so extension

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 21:58:41 -0700, pradeep nair wrote: > HI, > > > How do i find files with .so extension using python . import os help(os.listdir) help(os.walk) help(os.path.splitext) That should give you all the tools you need. -- Steven D'Aprano -- http:

FInd files with .so extension

2007-05-02 Thread pradeep nair
HI, How do i find files with .so extension using python . -- http://mail.python.org/mailman/listinfo/python-list