Eduardo Vieira wrote:
On Fri, Mar 20, 2009 at 2:29 PM, Eduardo Vieira <eduardo.su...@gmail.com> wrote:
On Fri, Mar 20, 2009 at 9:04 AM, Tim Golden <m...@timgolden.me.uk> wrote:
Eduardo Vieira wrote:
Thank you very much, Tim for the thorough explanation. Much more than
I could expect. It will be specially useful for me a newbie python
amateur programmer. I will try your guidance as soon as possible
today, and see my progress.
That's ok; might be worth posting back to the list to say
whether it worked or not. All the posts go into the archive
so people looking in the future for the same kind of solution
might be interested to know if my suggestion worked or
whether there were any other obstacles.
TJG
Thanks again. I tried the code, trying to reformat the spaces and came
up with this code: http://paste.lisp.org/display/77353
I'm not sure if I indented correctly, and the result it gave me was:
Searching Archive Folders
Searching Mailbox - Eduardo Silva
I don't understand the part "for folder, folders, items in cdo_walk
(info_store.RootFolder):"
RootFolder is IPM_SUBTREE if I check the Name value
I worked! sorry, I had to just align "raise x_found" with the "for"
statement, thank you very much!
Glad you got it working. The "for folder, folders, items in..." bit
is looping over each folder (with its subfolders and subitems) in
turn. cdo_walk is a generator -- a function-type mechanism which keeps
returning values, rather than just returning once. Because of that,
you can keep looping over it as it walks down the tree of folders,
recursively in this case altho' other approaches are possible.
FWIW, RootFolder is nearly always IPM_SUBTREE; its name doesn't
really matter: it's just a place to start looking.
Sorry about the formatting. With something more than a few lines
long I usually stick it in pastebin or wherever, but I was moving
too quickly when I wrote that this morning!
TJG
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor