← Back to team overview

sikuli-driver team mailing list archive

[Question #214277]: Blank log file

 

New question #214277 on Sikuli:
https://answers.launchpad.net/sikuli/+question/214277

Hello! I am new to jython but moderate programmer. I am trying to write to a file for someone to see whether or not the test passed. But I get a blank write.txt file back. So here is generic code. 

f = open(my_dir + 'read.txt', 'r')
#do work
username = f.readline()
password = f.readline()
f.close
w = open(my_dir + 'write.txt", 'w')
w.write("username was " +  username)
#some more work
w.close()
sleep(5)
# script ends here.

Experimented with w.flush and everything and nothing seems to work. 

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