sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03926
Re: [Question #163412]: Copy Multiple Login Details From A text file and Login?
Question #163412 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/163412
Status: Open => Answered
RaiMan proposed the following answer:
theFile = file(r"path-to-the-file-that-contains-the-email:pass-lines.txt")
for line in theFile:
line = line.strip()
if len(line) == 0: continue
print line
(email, password) = line.split(":")
email = email.strip()
password = password.strip()
print "email=", email
print "password=", password
theFile.close()
this works, as long each line contains only one colon and this is between email and password.
x.strip() gets rid of surrounding whitespace.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.