Lab 10 FAQ

General Recommendations | Debugging Advice | SocialNetwork class | InstaFace program

General Recommendations

Debugging Advice

SocialNetwork

Reading in the People File. When you read in from a file, what does every line end with? How will that affect your code? Anything you should fix?

Reading in the Connections File. We solved a similar problem in terms of reading in this file format in class when we read in the file with the format name year on each line.

Exporting People. What is the format of the people file that you read in? That is what you want to write out in this method. Note that this method takes the filename, where as the helper method takes the file object.

InstaFace

Command-line Arguments. Look at the example code from the lab slides. You may want to copy the program into IDLE. To test the command-line arguments, you need to run the program from the terminal. The idea is to make testing the program easier with a variety of files used as inputs (without having to retype the filenames). I've done most of the hard work. Just read the comments for what you need to do.

Recommendations: