sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12920
Re: [Question #207655]: Need to pass input as file from user
Question #207655 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/207655
Status: Open => Answered
RaiMan proposed the following answer:
# get and store the values
config = {} # empty dictionary (key-value-store)
input = open("absolute-path-to-file")
for line in input.readlines():
# we use strip() to get rid of surrounding whitespace
(key, value) = line.strip().split(":")
config[key.strip()] = value.strip()
input.close()
# now you can use the dictionary to retrieve the values
# position on XSXIP input field
paste(config["ESXID"]) # paste the ip address
# ....
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.