queston with glob!!
EdwardT
edwardt at trillium.com
Wed Apr 18 17:18:53 EDT 2001
Hi I have the following situation:
Let's asy th current working dorecotyr is
/vobs/qa/stf/ctf/src/sample/tpu/log.
There a bunch of subdirectories tpTcCTFTEST10/ tpTcCTFTESTTIGHT02/
tpTcTNLC14_2/ tpTcTNLC6_5/ tpTcCTFTEST11/
tpTcCTFTESTTIGHT03/ tpTcTNLC15_1/ tpTcTNLC6_6/
tpTcCTFTEST12/ tpTcCTFTESTTIGHT04/ tpTcTNLC16_1/
tpTcTNLC6_7/ tpTcCTFTEST13/ tpTcCTFTESTTIGHT05/
tpTcTNLC16_2/ tpTcTNLC6_8/ tpTcCTFTEST14/
tpTcCTFTESTTIGHT06/ tpTcTNLC17_1/ tpTcTNLC7_1/
tpTcCTFTEST16/ tpTcCTFTESTTIGHT07/ tpTcTNLC1_1/
tpTcTNLC8_1/ tpTcCTFTEST17/ tpTcCTFTESTTIGHT08/
tpTcTNLC1_2/ tpTcTNLC8_2/ tpTcCTFTEST18/
tpTcCTFTESTTIGHT0811/ tpTcTNLC2_1/ tpTcTNLC8_3/
tpTcCTFTEST19/ tpTcCTFTESTTIGHT09/ tpTcTNLC2_2/
tpTcTNLC9_1/ tpTcCTFTEST7/ tpTcCTFTESTTIGHT12/
tpTcTNLC4_1/ tpTcTNLC9_2/ tpTcCTFTEST8/
tpTcTNLC10_2/ tpTcTNLC6_1/ tpTcTNLC9_3/
tpTcCTFTEST9/ tpTcTNLC11_1/ tpTcTNLC6_2/
tpTcTNLC9_4/
tpTcCTFTESTTIGHT01/ tpTcTNLC11_2/ tpTcTNLC6_3/
tpTcCTFTESTTIGHT010/ tpTcTNLC14_1/ tpTcTNLC6_4/
There files inside these directories which I want ot search and store
recursively from the current diretory down deep to the lowest level of
subdirectory.
I use glob.glob(currentDir+os.sep+'*')
But this can only get me the subdirectory not the files down. If I want down
one more level, then I need to write this glob.glob(currentDir + os.sep +
os.sep +'*')
which is not a good approach as it is too rigid.
How can I modify the code to search down to the deepest level?
Thanks
More information about the Python-list
mailing list