Re: generating a tree-like structure



On May 31, 12:44 pm, Thorsten Kampe <thors...@xxxxxxxxxxxxxxxx> wrote:
Hi,

This is a fairly general question: is there some kind of module or
framework that allows building a tree like structure from certain kind
of data?

To be specific: I have a program that dumps the content of a LDAP
directory including all properties and values and groups the result
from the LDAP search by objClass.

Now I was thinking: would it be possible to generate from the totally
unordered output that the LDAP server gives me, a tree like
representation that displays the hierarchy (omitting the values or
even properties if necessary)?

It should be a textual representation of what you see in GUI programs
like "LDAP Administrator" but the output should be represented like
the "tree" program in Linux or Windows "tree.com".

Any ideas appreciated...

Thorsten

I think you might be able to use ElementTree. The website for the
module claims it can be used for hierarchical data structures:
http://effbot.org/zone/element-index.htm

Did you look at any of the Python LDAP tools? They might be useful
too. See some of the links below:
http://linuxjournal.com/article/6988
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303336

Hopefully they'll give some guidance. I've not used LDAP myself as of
yet.

Mike

.



Relevant Pages

  • Re: Enumerating all available objectClass?
    ... inheritance model. ... I ask this seriously as I do A LOT of LDAP ... ActiveDirectorySchema.GetCurrentSchemaand then calling FindAllClasses() ... If you want to build a tree, ...
    (microsoft.public.windows.server.active_directory)
  • Re: Urgent: Restrict LDAP Queries of a domain user
    ... I can only set LDAP read permissions to all the tree? ... Joe Kaplan escreveu: ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)
  • Re: [PHP] user access/roles/privs functionality
    ... up/down in the tree as required. ... If I can find the right process, I'll implement it in my targeted app. ... PHP General Mailing List ... You certainly have a tree since LDAP is a directory although AFAIK it is slower when writing if you compare it with a database but much faster when reading data. ...
    (php.general)
  • Re: generating a tree-like structure
    ... framework that allows building a tree like structure from certain kind ... I have a program that dumps the content of a LDAP ... It should be a textual representation of what you see in GUI programs ... Did you look at any of the Python LDAP tools? ...
    (comp.lang.python)
  • generating a tree-like structure
    ... framework that allows building a tree like structure from certain kind ... I have a program that dumps the content of a LDAP ... unordered output that the LDAP server gives me, ... It should be a textual representation of what you see in GUI programs ...
    (comp.lang.python)