On Thu, Nov 18, 2010 at 10:46:47AM +0530, Kenneth Gonsalves wrote: > > > > Check if os.walk() is useful. > > but that is looping - which he does not want.
Then he can wrap python over 'find -type f |wc -l' - Provided he is on POSIX and wants to just count the files. os.system('find -type f |wc -l') OR proc1 = subprocess.Popen(['find','-type','f'],stdout=subprocess.PIPE) proc2 = subprocess.Popen(['wc','-l'],stdin=proc1.stdout,stdout=subprocess.PIPE) out,err = proc2.communicate() _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers