Re: [BangPypers] parsing directory and subdirecties

2010-11-19 Thread Vasudevan N
The simplest way would be to use recursive calls. Thanks, Vasu On Wed, Nov 17, 2010 at 8:05 PM, Nitin Kumar nitin.n...@gmail.com wrote: hi all, is there any simple way where a can parse into directory and subdirectories to get the detail of files and count. or do i need to use looping and

Re: [BangPypers] parsing directory and subdirecties

2010-11-19 Thread Dhananjay Nene
On Sat, Nov 20, 2010 at 5:28 AM, Vasudevan N vasudevan...@gmail.com wrote: The simplest way would be to use recursive calls. Vasu, a. That could still entail a loop on a files per directory basis b. If you avoid the loop and recurse on a per file (eg by shaving the head off the sequence and

Re: [BangPypers] parsing directory and subdirecties

2010-11-18 Thread Senthil Kumaran
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')

Re: [BangPypers] parsing directory and subdirecties

2010-11-18 Thread Dhananjay Nene
On Thu, Nov 18, 2010 at 10:46 AM, Kenneth Gonsalves law...@au-kbc.orgwrote: On Thu, 2010-11-18 at 10:26 +0530, Asokan Pichai wrote: On 18 November 2010 09:35, Nitin Kumar nitin.n...@gmail.com wrote: hi all, is there any simple way where a can parse into directory and subdirectories

[BangPypers] parsing directory and subdirecties

2010-11-17 Thread Nitin Kumar
hi all, is there any simple way where a can parse into directory and subdirectories to get the detail of files and count. or do i need to use looping and other functionalities. -- Nitin K ___ BangPypers mailing list BangPypers@python.org

Re: [BangPypers] parsing directory and subdirecties

2010-11-17 Thread Asokan Pichai
On 18 November 2010 09:35, Nitin Kumar nitin.n...@gmail.com wrote: hi all, is there any simple way where a can parse into directory and subdirectories to get the detail of files and count. Check if os.walk() is useful. -- Asokan Pichai *---* We will find a way. Or, make one.

Re: [BangPypers] parsing directory and subdirecties

2010-11-17 Thread Kenneth Gonsalves
On Thu, 2010-11-18 at 10:26 +0530, Asokan Pichai wrote: On 18 November 2010 09:35, Nitin Kumar nitin.n...@gmail.com wrote: hi all, is there any simple way where a can parse into directory and subdirectories to get the detail of files and count. Check if os.walk() is useful. but that