Stephan Schulz wrote:
Is there a (portable, standard) way for the program/module to find out if it is imported or executed stand-alone?
def fixbb(*filelist): # ...
if __name__ == '__main__':
# Executed stand-alone
fixbb(sys.argv[1:])(Obviously, you'd probably want to do more command-line checking than this...)
Jeff Shannon Technician/Programmer Credit International
-- http://mail.python.org/mailman/listinfo/python-list
