newbie question

Roman Suzi rnd at onego.ru
Wed Jul 4 02:26:28 EDT 2001


On Wed, 4 Jul 2001, Freller Alex wrote:

> I would like to program a python script that parses a directory and its
> subdirectorys after specific files (*.pl) and count their linenumbers. 

If you are working under UNIX, you do not need to program it:

$ find . -name '*.py' | xargs wc

(this brokes only when there are too large number of files, but then you
could read man find to see how to call a command for each file.)

Sincerely yours, Roman A.Suzi
-- 
 - Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
 





More information about the Python-list mailing list