← Back to team overview

sikuli-driver team mailing list archive

[Question #142609]: readline.read_history_file is unavailable with sikuli?

 

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

Am I right that readline.read_history_file/readline.write_history_file are unavailable with sikuli? I'm fairly inexperienced with jython or coding in general but from what I've tried and the error messages I receive I think so but I'm not sure. 

If I'm correct, what would be the best method to store history of readline? I'm trying to read from a file, line by line, recording to a history file probably after every line (then doing something with the line) and I'd liked it to be saved to a history file so I can easily stop and start my script. As a quick test, what I'm trying at the moment is:

file_dir = "c:\\Temp\\"
listfile=open(file_dir + "list.txt")
while True:
	#listfile.readline.read_history_file(file_dir + "listfilehistory.txt")
	var1 = listfile.readline()
	var2 = listfile.readline()
	var3 = listfile.readline()
	#listfile.readline.writehistoryfile(file_dir + "listfilehistory.txt")
	print var3
	print var2
	print var1
	wait(11)
listfile.close()

This works as I expect except I can't use the history hence why it's commented out. As you may guess from my example, this is on Windows. Specifically Windows XP and I'm using Sikuli X-1.0rc1. 

Cheers

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