i think this will help you out, this is not the exact solution of your problem, but now you can find yourself.please indent it yourself, i am unable to indent in message box.
code:
import os
def directoryWalker( unused, dirName, nameList ):
print "Entering new directory: " + dirName
filename = raw_input("Enter file name : ")
if filename in nameList:
print "file is present"
print " " + os.path.join( dirName, filename )
print " "
else:
print "file is not here"
if __name__ == '__main__':
os.path.walk( os.curdir, directoryWalker, None )
raw_input( '\n\nPress Enter to exit...' )
Last edited by sharma_vivek82; Apr 21st, 2006 at 1:33 am. Reason: why indentation is not working