← Back to team overview

sikuli-driver team mailing list archive

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

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- 1.
to use the readline module, I guess you have to say 

import readline

before (it is not a built-in support)

--- 2.
I think your usage is not as intended by the module readline
look: http://docs.python.org/release/2.6.6/library/readline.html?highlight=readline#readline.read_history_file

The module seems to implement some support for history files together
with the interactive interpreter, so can save interactive sessions and
replay them at another time.

generally the functiona have to be used like
readline.read_history_file(filename) (loads and executes the contents of a history file)

--- 3.
In non-interactive scripting, I think, there is no need for such a function: you write down some scripting statements and save them using the Sikuli IDE - and then run them.
If you want to execute scripting statements, that are saved in another file, use execfile(filename).

--- 4.
If you are using interactive Jython, to test some Sikuli features and want to save what you have done, that might be the intended usage, but seems to be a little bit complicated, since you can always open a new tab in the IDE and try out what you want.

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