sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #27616
Re: [Question #252800]: changes from True to False
Question #252800 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252800
Status: Answered => Open
Richi is still having a problem:
Hi, i have tried your correction but still i have problem:
the new path to reach the Instructions.txt file is :
"C:\\Users\\Richi\\Desktop\\Instructions.txt"
the code used is:
def getInstructions(inp):
store = {}
configInput = open(inp)
for line in configInput.readlines():
(key, val) = line.strip().split("=")
store[key.strip()] = val.strip()
configInput.close()
return store
def putInstructions(out, store):
configOutput = open(out, "w")
for key in store.keys():
line = key + "=" + store[key] + "\n"
out.write(line)
configInput.close()
# step 1: fetch current instructions
instructions = getInstructions("C:\\Users\\Astrator\\Desktop\\Instructions.txt")
# step 2: modify instructions
instructions["data.configure.camera"] = "false"
# one might add additional instructions
instructions["data.configure.newoption"] = "true"
# step 3: write the instructions back to file
putInstructions(" C:\\Users\\Astrator\\Desktop\\Instructions.txt", instructions) <---- line 22
the error message is :
[error] script [ ConfigDR ] stopped with error in line 22
[error] IOError ( (13, 'Permission denied', ' C:\\Users\\Astrator\\Desktop\\Instructions.txt') )
[error] --- Traceback --- error source first line: module ( function ) statement 10: main ( putInstructions ) configOutput = open(out, "w")
[error] --- Traceback --- end --------------
can u help me out to change the above code lines , hence , the data.configure.camera=true argument is changed into data.configure.camera=false in the Instructions file please.
thanx
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.