I think wlan.py needs some more TLC. I tshould definitely allow you to type in a password and connect, but I'm still not quite sure if it works reliably, or at all, since it puts connection details in an unusual place ( /etc/network/interfaces instead of wpa_supplicant.conf I think )
I might need to look into an alternate Python library for working with WiFi settings.