Updated: 2/1/2005; 11:36:38 AM.
landonline
online educational delivery applications that are primarily course management systems (for product comparisons please see Landonline.EduTools.info)
        

Wednesday, January 12, 2005

Scripting LDAP with Jython -- Queries.

I've been playing with LDAP directories from Jython and thought I should share a couple of useful examples of what you can do. The first of these is a quick barebones query example. Enjoy.

# Jython LDAP Example

from javax.naming import * from java.util import * from javax.naming.directory import *

# Credentials to access LDAP user = "cn=master" passwd = "password"

# Query starting point and query target search_start = "ou=People,dc=Company,dc=com" search_target = "uid=aUserID"

# Setup LDAP Context Options settings = Hashtable() settings.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory") settings.put(Context.PROVIDER_URL, "ldap://localhost:389") settings.put(Context.SECURITY_PRINCIPAL, user) settings.put(Context.SECURITY_CREDENTIALS, passwd)

# Connect to LDAP Server ctx = InitialDirContext(settings)

srch = SearchControls() srch.setSearchScope(SearchControls.SUBTREE_SCOPE)

# Execute LDAP Search results = ctx.search(search_start, search_target, srch )

#Display Search` for result in results:

attributes = result.getAttributes() names = [] for atr in attributes.getIDs(): names.append(str(atr))

for name in names: print attributes.get(name)

[All things Jythonic]
11:47:56 PM      Google It!.

NASA Releases Free Global Climate Model Software [Slashdot:]
11:45:29 PM      Google It!.

Tools for Organizing Thoughts [Edubloggers Links Feed] good list but missing freemind and treepad -- BL

8:37:07 PM      Google It!.

Sentient Learning LOR [Edubloggers Links Feed]
8:33:48 PM      Google It!.

OpenLaszlo [Edubloggers Links Feed] The LPS compiles LZX applications into SWF bytecode for the Flash Player, serves and caches these compiled applications to any Web browser enabled with Flash 5 or later, and proxies application requests for back-end XML data sources and web services. -- This has some very interesting potential as flash players are becoming available for smartphones and wireless PDA's -- BL

8:32:29 PM      Google It!.

Exploring the use of blogs as learning spaces in the higher education sector [Edubloggers Links Feed]
8:27:46 PM      Google It!.

Identity Theft from University Computers [Slashdot:]
8:23:22 PM      Google It!.

Yahoo Releases Desktop Search Tool Beta [Slashdot:]
3:37:24 PM      Google It!.

Blackboard Accelerates e-Learning in China - PRNewswire. Blackboard Inc. announced today that it is helping to bring teaching and learning online throughout the People's Republic of China. More than 40 universities and schools across China have chosen The Blackboard Learning System(TM), provided by CerBibo [Online Learning Update]
3:32:25 PM      Google It!.

Calling all Moodlers! - Scoop. Waiariki Institute of Technology will be playing host to an international conference about Moodle software next month. Moodle, an acronym for Modular Object-Oriented Dynamic Learning Environment, is a learning management system used by many of New Zea [Online Learning Update]
3:31:57 PM      Google It!.

Experiencing Knowledge - Donald Norris, Jon Mason, Paul Lefrere, Innovate Online. To succeed in the Knowledge Age, people who have passed through today's formal education system—meaning most adults in Western economies—will need an order-of-magnitude leap in their capacity to acquire, assimilate, and share knowledge. Between now an [Online Learning Update]
3:31:18 PM      Google It!.

MSN Search supports RSS. This is very cool, and it's a differentiator for their search service because Google doesn't do it, nor does Yahoo, Jeeves, etc. It's also nice because they listened to us at the design review meeting late last year in Redmond. It was nearly unanimous among the bloggers that RSS support should be part of the search engine, both on the sending and receiving sides. Now one half has been taken care of. I'm sure this feature will gain wide use among bloggers. Very good. [Scripting News]
3:29:54 PM      Google It!.

PIP_blogging_data.pdf (application/pdf Object). Pew study on weblogs, RSS, and blogging [Edubloggers Links Feed]
3:28:03 PM      Google It!.

Skype + Podcast Recorder = SkypeCasters [Edubloggers Links Feed]
3:27:03 PM      Google It!.

Videos Quick, Easy and Automatic. A new program called Videora combines BitTorrent and RSS to automatically download a computer user's favorite videos. It's another application the entertainment companies will likely hate and consumers will love. By Katie Dean. [Wired News]
3:26:13 PM      Google It!.

Opera Offers Free Licenses For Educational Use [Slashdot:]
3:23:42 PM      Google It!.

Stephen Cohen reports that the Seattle Public Library is using RSS to publish updates. [Scripting News]
3:21:32 PM      Google It!.

BlogBib [Edubloggers Links Feed]
3:20:20 PM      Google It!.

Leapfrog Talking Pen [Slashdot:]
3:15:17 PM      Google It!.

© Copyright 2005 Bruce Landon.
January 2005
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Dec   Feb
Home

Subscribe to "landonline" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.