Ticket #14289: 14289_doctest_readline.patch

File 14289_doctest_readline.patch, 768 bytes (added by jdemeyer, 9 years ago)
  • sage/doctest/forker.py

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1363592028 -3600
    # Node ID d45bc63f0b40d84f9d314759cd800580f52d6fb4
    # Parent  3c2703dcc290b4ce96d18590b7598090772f86b4
    Import readline before forking
    
    diff --git a/sage/doctest/forker.py b/sage/doctest/forker.py
    a b  
    7878    import sage.misc.displayhook
    7979    sys.displayhook = sage.misc.displayhook.DisplayHook(sys.displayhook)
    8080
     81    # We import readline before forking, otherwise Pdb doesn't work
     82    # os OS X: http://trac.sagemath.org/sage_trac/ticket/14289
     83    import readline
     84
    8185    # Workarounds for https://github.com/sagemath/sagenb/pull/84
    8286    import sagenb.notebook.misc
    8387    import sagenb.notebook.sage_email