New in version 0.5.
The module petl.interactive provides all of the functions present in the root petl module, but with a couple of optimisations for use within an interactive session.
The main optimisation is that some caching is done behind the scenes, so that by default the first 100 rows of any table are cached in memory the first time they are requested. This usually provides a better experience when building up a transformation pipeline one step at a time, where you are examining the outputs of each intermediate step as its written via look() or see(). I.e., as each new step is added and the output examined, as long as less than 100 rows are requested, only that new step will actually be executed, and none of the upstream transformations will be repeated, because the outputs from previous steps will have been cached.
The default cache size can be changed by setting petl.interactive.cachesize to an integer value.
Note also that, by default, the look() function is used to generate a representation of tables. So you don’t need to type, e.g., >>> look(mytable), you can just type >>> mytable. The default representation function can be changed by setting petl.interactive.representation, e.g., petl.interactive.representation = petl.see, or petl.interactive.representation = None to disable this behaviour.