[Tutor] advise on this loop

Norman Khine norman at khine.net
Thu Jun 4 17:59:22 CEST 2009


On Thu, Jun 4, 2009 at 3:48 PM, W W <srilyk at gmail.com> wrote:
> On Thu, Jun 4, 2009 at 8:29 AM, Norman Khine <norman at khine.net> wrote:
>>
>> Hello,
>> I have the following code, which searches through a directory structure
>> such as:
>>
>> $ tree -L 2 companies
>> companies
>> |-- aberdeen-airport-ltd
>> |   |-- aberdeen-airport-dyce-grampian
>> |   `-- aberdeen-airport-dyce-grampian.metadata
>> |-- aberdeen-airport-ltd.metadata
>> |-- aberdeen-motor-company-ltd
>> |   |-- mugiemoss-road-grampian
>> |   `-- mugiemoss-road-grampian.metadata
>>
>>
>> the code can be seen at:
>>
>> http://paste.lisp.org/display/81348
>>
>> I basically have a form, where the user makes a search for 'Company'
>> name, than the code searches for all the items that do not contain
>> 'hotel' in the metadata
>>
>> This works for the first level, i.e. when searching in the companies
>> directory.
>>
>> Now I want to extend this to search for the '/companies/company/ but
>> to only search the addresses that are in the found = [] list from the
>> previous search.
>
> I haven't looked at your code, but I presume your "search" is a function? I
> certainly hope so anyway! Also I presume you return the found list? If so,
> it should be trivial. If not, you should probably adjust your code to do
> such things.

Hi, thanks for the reply.

It was simpler than I thought.


> HTH,
> Wayne


More information about the Tutor mailing list