[IPython-dev] Limitations of log re-playing

Brian Granger ellisonbg.net at gmail.com
Mon Aug 17 23:32:16 EDT 2009


Currently when an IPython log is saved, it contains the command line
arguments and options that were passed to IPython.  This allow a log that is
being re-played later to have be run with the same command line arguments
and options.  While this idea is quite nice, I think we have a *very* leaky
abstraction that needs to be plugged in some manner.  Why do I say this is

* This assumes that the log is created by and re-played by the "ipython"
command line program.  As I refactor IPython, there are already becoming
*many* ways of running an InteractiveShell instance other than this.  In
these other contexts, the "command line arguments" simply don't make sense

* The log re-playing code is currently in ipmaker.py.  This is going away
entirely.  Of course, the log replay capability doesn't have to go away.
The best place to put it is in InteractiveShell or some other helper
component that manages logs.  But, putting it there further removes it from
the traditional command line context.

* The command line information is not a complete specification of the state
of IPython that was used to create the log.  Namely config file or other
runtime config changes could have dramatically changed the behavior and
those things might not be reflected in the log.

So, what should we do with IPython's log replaying capability:

* Just remove the saving of the command line args/opts when a log is saved.
This is my preference.
* Explore some other, command line independent way of storing IPython's
state in the log file.
* Get rid of log replaying all together.
* Something else I haven't thought of.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20090817/70baaf00/attachment.html>

More information about the IPython-dev mailing list