Return a string result with out breaking loop

castironpi castironpi at gmail.com
Tue Aug 26 21:07:45 EDT 2008


On Aug 26, 11:46 am, Andrew <nob... at yahoo.com> wrote:
...
>          results = change_handle
>          for action, files in results:
>              full_filename = os.path.join(path_to_watch, files)
>              theact = ACTIONS.get(action, "Unknown")
>              out2 = str(full_filename) +  " " + str(theact)
>          yield str(out2)

I think you have the yield in the wrong place.  Should you tab it over
one?



More information about the Python-list mailing list