From b74d06431dbf706722188e812dc597e63daff36e Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Sun, 8 May 2016 20:17:48 -0400 Subject: [PATCH] minor updates --- setup.py | 2 +- xonsh/aliases.py | 8 -------- xontrib/mpl.py | 12 ++++++++++++ 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 xontrib/mpl.py diff --git a/setup.py b/setup.py index e07ea5c60..112b2af12 100755 --- a/setup.py +++ b/setup.py @@ -135,7 +135,7 @@ def main(): url='https://github.com/scopatz/xonsh', platforms='Cross Platform', classifiers=['Programming Language :: Python :: 3'], - packages=['xonsh', 'xonsh.ptk', 'xonsh.parsers'], + packages=['xonsh', 'xonsh.ptk', 'xonsh.parsers', 'xontrib'], cmdclass={'install': xinstall, 'sdist': xsdist}, ) if HAVE_SETUPTOOLS: diff --git a/xonsh/aliases.py b/xonsh/aliases.py index 6b96b6e30..25ad3e80a 100644 --- a/xonsh/aliases.py +++ b/xonsh/aliases.py @@ -382,13 +382,6 @@ def vox(args, stdin=None): return vox(args, stdin=stdin) -@foreground -def mpl(args, stdin=None): - """Hooks to matplotlib""" - from xonsh.mplhooks import show - show() - - def make_default_aliases(): """Creates a new default aliases dictionary.""" default_aliases = { @@ -412,7 +405,6 @@ def make_default_aliases(): 'replay': replay_main, '!!': bang_bang, '!n': bang_n, - 'mpl': mpl, 'trace': trace, 'timeit': timeit_alias, 'xonfig': xonfig, diff --git a/xontrib/mpl.py b/xontrib/mpl.py new file mode 100644 index 000000000..2d03fe4e5 --- /dev/null +++ b/xontrib/mpl.py @@ -0,0 +1,12 @@ +"""Matplotlib xontribution.""" + +from xonsh.proc import foreground + +@foreground +def _mpl(args, stdin=None): + """Hooks to matplotlib""" + from xonsh.mplhooks import show + show() + + +aliases['mpl'] = _mpl \ No newline at end of file