Mercurial > hg > Applications > levistone
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:099871090d7a |
---|---|
1 import commands | |
2 | |
3 class LdapAccess: | |
4 def searchEdyId(self, edyId): | |
5 output = commands.getstatusoutput("ssh one@os.cr.ie.u-ryukyu.ac.jp -4 ldapsearch -LLL -x ldapedyid="+ edyId + " uid") | |
6 if output[1] == '': | |
7 return False | |
8 | |
9 return True | |
10 | |
11 if __name__ == '__main__': | |
12 ldapAccess = LdapAccess() | |
13 print(str(ldapAccess.searchEdyId('1234566'))+"\n") |