← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #680983]: Importing username and password from list

 

Question #680983 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680983

    Status: Open => Answered

RaiMan proposed the following answer:
something like that (plain Python scripting - has nothing to do with
SikuliX)

myFile = open("c:\\file.txt')
users = {} # a store
for line in myFile.readlines():
    line = line.strip() # remove surrounding whitespace
    (user, password) = line.split(":") # get the 2 elements
    users[user] = password # add to store

for user in users.keys():
    print "user: %s has password: %s" % (user, users[user])

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.