← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #169128]: writting to file, reading from file, string parsing in Sikuli IDE?

 

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

    Status: Open => Answered

vitalliuss proposed the following answer:
To write a file use the following:

text = "some text here"
f = open(filename, 'w')
f.write(text)
f.flush()
f.close()

To read file use 'r' mode:

f = open(filename, 'r')
f.read()
f.close()

Additional options you can found here:
http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-
files

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