sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #27325
Re: [Question #252390]: changing a variable from true to false (sikuli)
Question #252390 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252390
Status: Open => Answered
Eugene S proposed the following answer:
Hi,
Actually you don't need to use Sikuli for that purpose.
As far as I understand you only need to find a line in file and rewrite it accordingly.
You can do that with clean Python, for example like that (WARNING, this
will rewrite your file):
import fileinput
for line in fileinput.input(<fileName>, inplace = True):
if appPattern in line: # If pattern found. In your case can be something like "configure.camera"
print "configure.camera=<XXX>" #Write line to file with relevant status
else:
print line, #Just rewrites line
Hope that helps.
Cheers,
Eugene
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.