class_docstr: A Mixin for applications that start InteractiveShell instances.
  
  Provides configurables for loading extensions and executing files
  as part of configuring a Shell environment.
  
  The following methods should be called by the :meth:`initialize` method
  of the subclass:
  
    - :meth:`init_path`
    - :meth:`init_shell` (to be implemented by the subclass)
    - :meth:`init_gui_pylab`
    - :meth:`init_extensions`
    - :meth:`init_code`
class_docstr_tok: ["A","Mixin","for","applications","that","start","InteractiveShell","instances",".","Provides","configurables","for","loading","extensions","and","executing","files","as","part","of","configuring","a","Shell","environment",".","The","following","methods","should","be","called","by","the",":","meth",":","`","initialize","`","method","of","the","subclass",":","-",":","meth",":","`","init_path","`","-",":","meth",":","`","init_shell","`","(","to","be","implemented","by","the","subclass",")","-",":","meth",":","`","init_gui_pylab","`","-",":","meth",":","`","init_extensions","`","-",":","meth",":","`","init_code","`"]
docstr: Run code or file specified at the command-line
docstr_tok: ["Run","code","or","file","specified","at","the","command-line"]
code: def _run_cmd_line_code(self):
      """Run code or file specified at the command-line"""
      if self.code_to_run:
          line = self.code_to_run
          try:
              self.log.info(
                  "Running code given at command line (c=): %s" % line
              )
              self.shell.run_cell(line, store_history=False)
          except:
              self.log.warning(
                  "Error in executing line in user namespace: %s" % line
              )
              self.shell.showtraceback()
              if not self.interact:
                  self.exit(1)
  
      # Like Python itself, ignore the second if the first of these is present
      elif self.file_to_run:
          fname = self.file_to_run
          if os.path.isdir(fname):
              fname = os.path.join(fname, "__main__.py")
          if not os.path.exists(fname):
              self.log.warning("File '%s' doesn't exist", fname)
              if not self.interact:
                  self.exit(2)
          try:
              self._exec_file(fname, shell_futures=True)
          except:
              self.shell.showtraceback(tb_offset=4)
              if not self.interact:
                  self.exit(1)
  
imports: import glob
  from itertools import chain
  import os
  import sys
  from traitlets.config.application import boolean_flag
  from traitlets.config.configurable import Configurable
  from traitlets.config.loader import Config
  from IPython.core.application import SYSTEM_CONFIG_DIRS, ENV_CONFIG_DIRS
  from IPython.core import pylabtools
  from IPython.utils.contexts import preserve_keys
  from IPython.utils.path import filefind
  from traitlets import Unicode, Instance, List, Bool, CaselessStrEnum, observe, DottedObjectName
  from IPython.terminal import pt_inputhooks
label_desc: Use image node_id 11 for calling the InteractiveShellApp obj's underlying member method code with example usage: obj._run_cmd_line_code() without return types