Python scripts can run without a main(). What is the advantage to using a 
main()? Is it necessary to use a main() when the script uses command line 
arguments? (See script below)

#!/usr/bin/python

import sys

def main():
    # print command line arguments
    for arg in sys.argv[1:]:
        print arg

if __name__ == "__main__":
    main()
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to