Re: is parameter an iterable?
How about hasattr("__iter__")? Regards, Karsten. -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there any Iterator type example?
How about this one: import os from os.path import join def py_files(dir): for root, dirs, files in os.walk(dir): for name in files: if name.lower().endswith(".py"): yield join(root,name ) if __name__=="__main__": dir= "C:\\Python23\\" for f in py_files(dir): print f