[Tutor] Hard drive searching

Kalle Svensson kalle@gnupung.net
Tue, 30 Jan 2001 20:46:13 +0100


--XOIedfhf+7KOe/yw
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Sez Matthias Hager:
> I've been thinking about this for awhile, but can't figure anything out.
> What I need my python program to do is, go through my hard drive, as
> quickly as possible, and return all the files that end with a certain
> extension(like .html or .py). How could I do this?  =20

You might want to look at os.path.walk().  Otherwise, I have no great ideas
at this time.

Peace,
  Kalle
--=20
Email: kalle@gnupung.net     | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD

--XOIedfhf+7KOe/yw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6dxoFdNeA1787sd0RAkgSAKCm3gCTh3D/Jh7bnCF0marGkkJocACfbCxE
X2gqqYXnerDYumGR/G2A310=
=RFzh
-----END PGP SIGNATURE-----

--XOIedfhf+7KOe/yw--