Skip to content

Commit

Permalink
IPdb: Add a new Matplotlib magic
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Sep 12, 2018
1 parent b7de35c commit b2d402d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions spyder_kernels/ipdb/magics/matplotlib_magic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2018- Spyder Kernels Contributors
#
# Licensed under the terms of the MIT License
# (see spyder_kernels/__init__.py for details)
# -----------------------------------------------------------------------------

from metakernel import Magic


class MatplotlibMagic(Magic):

def line_matplotlib(self, gui):
"""
Mosas
"""
from ipykernel.eventloops import enable_gui
from IPython.core.interactiveshell import InteractiveShell

ipyshell = InteractiveShell()
ipyshell.enable_gui = enable_gui
ipyshell.enable_matplotlib(gui=gui)


def register_magics(kernel):
kernel.register_magics(MatplotlibMagic)

0 comments on commit b2d402d

Please sign in to comment.