Skip to content

Instantly share code, notes, and snippets.

@lkluft
Created May 6, 2016 11:04
Show Gist options
  • Save lkluft/bde5e78cc2fc8a3b5ae4dbf46b1eb00f to your computer and use it in GitHub Desktop.
Save lkluft/bde5e78cc2fc8a3b5ae4dbf46b1eb00f to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""Define convenience functions to clear IPython console and user
namespace in an MATLAB like way.
"""
from IPython import get_ipython
def clear_all():
"""Clear IPython user namespace."""
get_ipython().magic('reset -sf')
def clc():
"""Clear IPython console."""
get_ipython().magic('clear')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment