It seems that several people are still a little bit confused about what I would like you to do for homework 7. Your program should function much like any other UNIX program. For example, consider the wc program. I can use wc to count the words from several files. (From the resources/py directory)
I specified three files on the command line, separated by spaces.
The output should be something like:
37 116 895 args.py 34 105 847 opts.py 77 335 3167 auto_histling.py 148 556 4909 total
Note that the columns are nicely aligned. Your program should work in a similar way, except that it will be printing out mean word and sentence length.
The getopt method will return a list of options and arguments. The arguments should be the filenames you specified on the command line. You will want to loop over the arguments and process each file one at a time.
Rob
Also note that this homework does not involve the use of stdin, even though we did talk about that in class some today.