Article View: pl.comp.lang.python
Article #27604Re: rekursywne listowanie katalogu
From: Michal
Date: Mon, 26 Jul 2010 20:10
Date: Mon, 26 Jul 2010 20:10
17 lines
1555 bytes
1555 bytes
On Mon, 26 Jul 2010 04:21:38 +0200
marrgol <marspamrgol@gspammail.com> wrote:
> On 2010-07-26 01:01, Michal wrote:
> > Czy w pythonie jest jakas funkcja, ktora wylistuje mi katalog rekursywnie?
> > Wiem o funkcji os.walk
>
> os.walk zwraca wszystko, co trzeba, a wylistować chyba można samemu,
> w formie w jakiej się potrzebuje? ;-) Np. tak:
>
> for path, dirs, files in os.walk('katalog'):
> print path + '/'
> for file in files:
> print path + '/' + file
wiem, marudze. Jednak mialem nadzieje, ze da sie jakos w pythonie powtorzyc
shellowego jednolinijkowca find -iname 'hurra*txt' -exec process {} \;
Technical Details
Message-ID:
<20100726221002.957f1063.natural-born-killer@donotmail.me>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailReferences:
<20100726010149.92ae9f6d.natural-born-killer@donotmail.me> <4c4cf132$0$2587$65785112@news.neostrada.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: Michal <natural-born-killer@donotmail.me> Newsgroups: pl.comp.lang.python Subject: Re: rekursywne listowanie katalogu Date: Mon, 26 Jul 2010 22:10:02 +0200 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 18 Message-ID: <20100726221002.957f1063.natural-born-killer@donotmail.me> References: <20100726010149.92ae9f6d.natural-born-killer@donotmail.me> <4c4cf132$0$2587$65785112@news.neostrada.pl> NNTP-Posting-Host: ip-93.159.51.245.static.crowley.pl Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1280175005 14889 93.159.51.245 (26 Jul 2010 20:10:05 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Mon, 26 Jul 2010 20:10:05 +0000 (UTC) X-Newsreader: Sylpheed 3.0.3 (GTK+ 2.20.1; x86_64-unknown-linux-gnu) X-User: natural-born-killer Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit