#!/usr/bin/env sampy # # a sample run project script for SAM v6_0 # import os, sys, string, time, signal ############################################################################ # project_definition = "already_in_cache" sam_station = "lauristation" snapshot_version = 'new' appname = 'demo' version = '1' appfamily = 'demo' # new keyword, introduced at sam v7_3_1 group = "dzero" max_file_amt = 1000 ##verbosity = "--verbose" verbosity = "" # Give up on all exceptions give_up = 1 # to illustrate pre/post processing: global fileCount # optional initialization: def begin_project(): global fileCount print("MY PROJECT: into begin_project, do what needs to be done BEFORE file_ready().") fileCount = 0 return # REQUIRED, file_ready processing: def file_ready(filename): global fileCount print("MY PROJECT: working on a file named >%s<" % filename) fileCount += 1 return # optional post-processing: def end_project(): global fileCount print("MY PROJECT: into end_project, do what needs to be done AFTER all files are processed.") print("MY PROJECT saw %s files." % fileCount) return