Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Functions
boilerplate Namespace Reference

Functions

def main
 YOUR IMPORTS GO HERE #.
def main_wrapper

Function Documentation

def boilerplate.main (   argv)

YOUR IMPORTS GO HERE #.

This is a documentation string. Write a description of what your code
does here. You should generally put documentation strings ("docstrings")
on all your Python functions.

Definition at line 20 of file boilerplate.py.

00020 
00021 def main(argv):
00022     """This is a documentation string. Write a description of what your code
00023     does here. You should generally put documentation strings ("docstrings")
00024     on all your Python functions."""
00025     #########################
00026     #  YOUR CODE GOES HERE  #
00027     #########################
00028     pass    # <--- Delete this line

Here is the caller graph for this function:

def boilerplate.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.

Definition at line 29 of file boilerplate.py.

00029 
00030 def main_wrapper(argv):
00031     """The main_wrapper() function disables redrawing, sets a sensible generic
00032     status bar message, and optionally sets up the progress bar. It then runs
00033     the main() function. Once everything finishes it cleans up after the main()
00034     function, making sure everything is sane before the script terminates."""
00035     try:
00036         scribus.statusMessage("Running script...")
00037         scribus.progressReset()
00038         main(argv)
00039     finally:
00040         # Exit neatly even if the script terminated with an exception,
00041         # so we leave the progress bar and status bar blank and make sure
00042         # drawing is enabled.
00043         if scribus.haveDoc():
00044             scribus.setRedraw(True)
00045         scribus.statusMessage("")
00046         scribus.progressReset()
00047 
00048 # This code detects if the script is being run as a script, or imported as a module.
00049 # It only runs main() if being run as a script. This permits you to import your script
# and control it manually for debugging.

Here is the call graph for this function: