sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #27576
Re: [Question #252800]: changes from True to False
Question #252800 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252800
Status: Open => Answered
RaiMan proposed the following answer:
according to the definition of the file input module (that is not needed
here though):
import fileinput
def changecameraParameter(status):
pass # should be some code here
def mobileParameter(status):
pass # should be some code here
def radioParameter(status):
pass # should be some code here
for line in fileinput.input("C:\\Users\\Richi\\Desktop\\Instructions.txt"):
(key, val) = line.strip().split("=")
if key.strip().startsWith("configure.camera"):
val = True if val.strip == "true" else False
changeCameraParameter(val)
--- no need for fileinput
for line in open("C:\\Users\\Richi\\Desktop\\Instructions.txt").readlines():
(key, val) = line.strip().split("=")
if key.strip().startsWith("configure.camera"):
val = True if val.strip == "true" else False
changeCameraParameter(val)
# …. same for the other options
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.