You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There could be options in the history preferences to include run file, run cells and run selections events in the history.
Something like:
Save in History:
[x] Run Files
[x] Run Cells
[x] Run Selections
If the option is unchecked the commands would still show up in the shell when they run but there would be no entry in the history or in the previous commands (the up arrow)
When #7141 gets merged the solution could look something like running this after the command is executed.
hismgr=self.kernel_client.history_managersession_id=hismgr.get_last_session_id()
line=self.kernel_client.history_accessor.get_tail(1, include_latest=True)[1]
hismgr.db.execute('DELETE FROM history WHERE line={0} and session={1}'.format(line, session_id))
This is untested and isn't really skipping the history, more like undoing it. I think this might be all we can do without patching IPython.
There is a "store_history" option in the ipython execute which sounds promising but it is functionally equivalent to "silent". It doesn't show the command in the console and the "busy" status isn't activated.
The best option I suppose would be to get an option on IPython execute to skip the history.
The text was updated successfully, but these errors were encountered:
@bcolsen, I don't think you proposal is feasible as it is because if two evaluations in different consoles finish at the same time, trying to delete their entries in the global history could corrupt the database.
Maybe there's an option to tell IPython: don't save history for this evaluation.
I don't think you proposal is feasible as it is because if two evaluations in different consoles finish at the same time
The history for each console would need to be separate for this to work(which they are already) but I think that's the best way forward at this point. We would just need to be sure to have the right session id for the console. I think the get line is actually unnecessary because we should already know this.
Maybe there's an option to tell IPython: don't save history for this evaluation.
That would be ideal. Is this something that can be done in qtconsole? I had a look at the hidden option there but it was more like silent.
There could be options in the history preferences to include run file, run cells and run selections events in the history.
Something like:
If the option is unchecked the commands would still show up in the shell when they run but there would be no entry in the history or in the previous commands (the up arrow)
I thought I would split this off from #7113
When #7141 gets merged the solution could look something like running this after the command is executed.
This is untested and isn't really skipping the history, more like undoing it. I think this might be all we can do without patching IPython.
There is a "store_history" option in the ipython
execute
which sounds promising but it is functionally equivalent to "silent". It doesn't show the command in the console and the "busy" status isn't activated.The best option I suppose would be to get an option on IPython execute to skip the history.
The text was updated successfully, but these errors were encountered: