Getting sub-objects from ADSI

Discussion in 'Python' started by Michael P. Nugent, Jul 23, 2003.

  1. How do I get the underlying values from Win::OLE=Hash(0x...) type
    objects? I can do it in Perl, but not in Python.

    For instance, I get

    CN=Fred
    <COMObject <unknown>>
    <COMObject <unknown>>

    when running

    #! python

    import pythoncom
    from win32com.client import GetObject

    UserPath = "LDAP://CN=Fred,OU=Two,OU=One,DC=nw,DC=home,DC=here,DC=com"

    ldap = GetObject(Userpath)

    print ldap.Name
    print ldap.Groups()
    print ldap.LastLogoff

    I know that Groups is of the type <bound method CDispatch.Groups of
    <COMObject ...>>, but that knowledge does not help me much. I have
    fiddled a bit with GetInfo and Dispatch, but it doesn't change the
    results.
     
    Michael P. Nugent, Jul 23, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kenneth Keeley

    Getting the PwdLastSet from ADSI

    Kenneth Keeley, Aug 3, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    5,156
    Kenneth Keeley
    Aug 3, 2004
  2. Ben
    Replies:
    2
    Views:
    905
  3. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    2,056
    Lawrence D'Oliveiro
    May 20, 2011
  4. johnny

    calling ADSI objects from WebApplication

    johnny, Jan 28, 2005, in forum: ASP .Net Security
    Replies:
    1
    Views:
    123
    Joe Kaplan \(MVP - ADSI\)
    Jan 28, 2005
  5. Replies:
    8
    Views:
    311
    Jorgen Grahn
    May 16, 2013
Loading...

Share This Page