code: def shell(no_ipython):
      
      banner = "Interactive Werkzeug Shell"
      namespace = make_shell()
      if not no_ipython:
          try:
              try:
                  from IPython.frontend.terminal.embed import InteractiveShellEmbed
  
                  sh = InteractiveShellEmbed.instance(banner1=banner)
              except ImportError:
                  from IPython.Shell import IPShellEmbed
  
                  sh = IPShellEmbed(banner=banner)
          except ImportError:
              pass
          else:
              sh(local_ns=namespace)
              return
      from code import interact
  
      interact(banner, local=namespace)
docs: Start a new interactive python session.