code: def run(self, args):
          
          super(ShellCommand, self).run(args)
  
          # load the application
          app = self.load_app()
  
          # prepare the locals
          locs = dict(__name__='pecan-admin')
          locs['wsgiapp'] = app
          locs['app'] = TestApp(app)
  
          model = self.load_model(app.config)
          if model:
              locs['model'] = model
  
          # insert the pecan locals
          from pecan import abort, conf, redirect, request, response
          locs['abort'] = abort
          locs['conf'] = conf
          locs['redirect'] = redirect
          locs['request'] = request
          locs['response'] = response
  
          # prepare the banner
          banner = '  The following objects are available:\n'
          banner += '  %-10s - This project\'s WSGI App instance\n' % 'wsgiapp'
          banner += '  %-10s - The current configuration\n' % 'conf'
          banner += '  %-10s - webtest.TestApp wrapped around wsgiapp\n' % 'app'
          if model:
              model_name = getattr(
                  model,
                  '__module__',
                  getattr(model, '__name__', 'model')
              )
              banner += '  %-10s - Models from %s\n' % ('model', model_name)
  
          self.invoke_shell(locs, banner)
docs: Load the pecan app, prepare the locals, sets the
          banner, and invokes the python shell.