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. Advertisements

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. THY
    Replies:
    1
    Views:
    536
    Steve C. Orr, MCSD
    Aug 19, 2003
  2. Kathy Burke
    Replies:
    3
    Views:
    596
    Kathy Burke
    Nov 24, 2003
  3. Kenneth Keeley

    Getting the PwdLastSet from ADSI

    Kenneth Keeley, Aug 3, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    5,559
    Kenneth Keeley
    Aug 3, 2004
  4. 7stud
    Replies:
    11
    Views:
    1,063
    Dennis Lee Bieber
    Mar 20, 2007
  5. Ben
    Replies:
    2
    Views:
    1,243
  6. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    3,075
    Lawrence D'Oliveiro
    May 20, 2011
  7. johnny

    calling ADSI objects from WebApplication

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