I was playing with os.walk today. I can use os.walk in a for loop (does
that make it an iterator or just an irritable? ^_^), but if I assign
os.walk to 'test' (test = os.walk(<path>)), that variable becomes a
generator object that does not work in a for loop. From what I can tell,
it's supposed to work in a generator function using 'yield', but I'm at
a loss at how that all works.

I suppose I should just stick with using the os.walk in the for loop,
but I'd like to make sense of the whole thing. Please someone explain
this to me?

Thanks.

Ray
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to