return lit(a)
def login(socket,user,mdp="",typ="bdd"):
- if user in ["20-100","moibdd","#1"]:
+ if user in ["#1", "test"]:
a.write('["login", ["#1","plop","bdd",[[],[],false]]]')
elif user in ["vincent","moi"]:
a.write('["login", ["vincent","plop","special",[]]]')
a.write('["login", ["toto","plop","bdd",[[],[],false]]]')
else:
a.write('["login", ["%s","%s","%s",[[],[],false]]]'%(user,mdp,typ))
+ if mdp == "":
+ import getpass
+ mdp = getpass.getpass()
return lit(a)
def search(socket,term):
a.settimeout(2)
#checkidentity(a)
print hello(a,"Python Client alpha")
+ try:
+ import secrets
+ user = secrets.user
+ password = secrets.password
+ except ImportError:
+ print "Y U no secrets.py !?"
+ exit(1)
print login(a,"20-100","plop")
print "Socket créée dans la variable \"a\""