parameters: (argv)
docstring: The main_wrapper() function disables redrawing, sets a sensible generic
      status bar message, and optionally sets up the progress bar. It then runs
      the main() function. Once everything finishes it cleans up after the main()
      function, making sure everything is sane before the script terminates.
docstring_summary: The main_wrapper() function disables redrawing, sets a sensible generic
      status bar message, and optionally sets up the progress bar. It then runs
      the main() function. Once everything finishes it cleans up after the main()
      function, making sure everything is sane before the script terminates.
docstring_tokens: The main_wrapper () function disables redrawing sets a sensible generic status bar message and optionally sets up the progress bar . It then runs the main () function . Once everything finishes it cleans up after the main () function making sure everything is sane before the script terminates .
function: def main_wrapper(argv):
      """The main_wrapper() function disables redrawing, sets a sensible generic
      status bar message, and optionally sets up the progress bar. It then runs
      the main() function. Once everything finishes it cleans up after the main()
      function, making sure everything is sane before the script terminates."""
      try:
          #scribus.statusMessage("Running script...")
          scribus.progressReset()
          main(argv)
      finally:
          # Exit neatly even if the script terminated with an exception,
          # so we leave the progress bar and status bar blank and make sure
          # drawing is enabled.
          if scribus.haveDoc():
              scribus.setRedraw(True)
          scribus.statusMessage("")
          scribus.progressReset()
function_tokens: def main_wrapper ( argv ) : try : #scribus.statusMessage("Running script...") scribus . progressReset ( ) main ( argv ) finally : # Exit neatly even if the script terminated with an exception, # so we leave the progress bar and status bar blank and make sure # drawing is enabled. if scribus . haveDoc ( ) : scribus . setRedraw ( True ) scribus . statusMessage ( "" ) scribus . progressReset ( )