Mercurial > hg > Applications > levistone
diff ldapaccess.py @ 0:099871090d7a draft default tip
Add edyReader scripts
py HG: added pifacedigitalio.py
author | innparusu |
---|---|
date | Wed, 13 Dec 2017 20:11:51 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ldapaccess.py Wed Dec 13 20:11:51 2017 +0900 @@ -0,0 +1,13 @@ +import commands + +class LdapAccess: + def searchEdyId(self, edyId): + output = commands.getstatusoutput("ssh one@os.cr.ie.u-ryukyu.ac.jp -4 ldapsearch -LLL -x ldapedyid="+ edyId + " uid") + if output[1] == '': + return False + + return True + +if __name__ == '__main__': + ldapAccess = LdapAccess() + print(str(ldapAccess.searchEdyId('1234566'))+"\n")