import getpass ... c.simple_bind_s('uid=hansimglueck,ou=people,dc=fh-sm,dc=de',getpass.getpass()) ...