← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #204153]: How to provide user input to sikuli script from a file

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
the basics:

--- make a comma separated text file like

user1,192.168.0.1,themachine,Windows 7
user2,192.168.0.2,themachine2,Windows 7

and so on

--- read the file and get the records/fields

fname = "absolute path to textfile"
f = open(fname)

for line in f.readlines()
    (user, ip, machine, system) = line.strip().split(",")
    print "current:" user, ip, machine, system
    # put your code here

f.close()

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.