class_docstr: Magics to manage various aspects of the user's namespace.
  
  These include listing variables, introspecting into them, etc.
class_docstr_tok: ["Magics","to","manage","various","aspects","of","the","user","'s","namespace",".","These","include","listing","variables",",","introspecting","into","them",",","etc","."]
docstr: Return a sorted list of all interactive variables.
  
  If arguments are given, only variables of types matching these
  arguments are returned.
  
  Examples
  --------
  
  Define two variables and list them with who_ls::
  
    In [1]: alpha = 123
  
    In [2]: beta = 'test'
  
    In [3]: %who_ls
    Out[3]: ['alpha', 'beta']
  
    In [4]: %who_ls int
    Out[4]: ['alpha']
  
    In [5]: %who_ls str
    Out[5]: ['beta']
docstr_tok: ["Return","a","sorted","list","of","all","interactive","variables",".","If","arguments","are","given",",","only","variables","of","types","matching","these","arguments","are","returned",".","Examples","--","--","--","--","Define","two","variables","and","list","them","with","who_ls",":",":","In","[","1","]",":","alpha","=","123","In","[","2","]",":","beta","=","'test'","In","[","3","]",":","%","who_ls","Out","[","3","]",":","[","'alpha","'",",","'beta","'","]","In","[","4","]",":","%","who_ls","int","Out","[","4","]",":","[","'alpha","'","]","In","[","5","]",":","%","who_ls","str","Out","[","5","]",":","[","'beta","'","]"]
code: def who_ls(self, parameter_s=""):
      """Return a sorted list of all interactive variables.
  
      If arguments are given, only variables of types matching these
      arguments are returned.
  
      Examples
      --------
  
      Define two variables and list them with who_ls::
  
        In [1]: alpha = 123
  
        In [2]: beta = 'test'
  
        In [3]: %who_ls
        Out[3]: ['alpha', 'beta']
  
        In [4]: %who_ls int
        Out[4]: ['alpha']
  
        In [5]: %who_ls str
        Out[5]: ['beta']
      """
  
      user_ns = self.shell.user_ns
      user_ns_hidden = self.shell.user_ns_hidden
      nonmatching = object()  # This can never be in user_ns
      out = [
          i
          for i in user_ns
          if not i.startswith("_")
          and (user_ns[i] is not user_ns_hidden.get(i, nonmatching))
      ]
  
      typelist = parameter_s.split()
      if typelist:
          typeset = set(typelist)
          out = [i for i in out if type(user_ns[i]).__name__ in typeset]
  
      out.sort()
      return out
  
imports: from __future__ import print_function
  import gc
  import re
  import sys
  from IPython.core import page
  from IPython.core.error import StdinNotImplementedError, UsageError
  from IPython.core.magic import Magics, magics_class, line_magic
  from IPython.testing.skipdoctest import skip_doctest
  from IPython.utils.encoding import DEFAULT_ENCODING
  from IPython.utils.openpy import read_py_file
  from IPython.utils.path import get_py_filename
  from IPython.utils.py3compat import unicode_type
label_desc: Use image node_id 8 for calling the NamespaceMagics obj's underlying member method code with example usage: obj.who_ls(parameter_s) and returns: out