Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IPython-specific session dump and load capability #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add IPython-specific session dump and load capability #103

wants to merge 2 commits into from

Commits on May 31, 2015

  1. dump_session: add byref_{filter,discard_missing}

    byref_filter allows the caller to supply a function that determines
    whether a given name should be pickled byref. This permits white- or
    black-listing of imported items.
    
    byref_discard_missing specifies whether names marked by the byref_filter
    which cannot be found should be silently discarded. This allows
    dynamically-generated items to be specifically excluded.
    abrasive committed May 31, 2015
    Configuration menu
    Copy the full SHA
    2f1185e View commit details
    Browse the repository at this point in the history
  2. add dump_ipython, load_ipython for IPython sessions

    These use the byref filtering mechanism to avoid pickling hidden items
    from the namespace. In Pylab or Matplotlib mode, this covers the
    implicit "from x import *". Items that cannot be found are silently
    discarded, which takes care of dynamically generated classes such as
    those from GObject which get thoughtlessly plunked into __main__ by the
    GTK backend.
    
    This also restores the hidden namespace after loading, ensuring that
    IPython's special handling of them in %who and so forth remains
    effective.
    abrasive committed May 31, 2015
    Configuration menu
    Copy the full SHA
    e6943c9 View commit details
    Browse the repository at this point in the history