Changes

Jump to: navigation, search

OPS435 Assignment 2 for Section C

142 bytes added, 17:32, 3 December 2020
Suggested Process
<li> Use the invite link posted to Blackboard to accept the assignment, and clone the repo to a Linux machine.
<li> Copy a2_template.py into a2_<myseneca_id>.py. Replace with your Myseneca username.
<li> Run the script itself. Investigate argparse. **In the main block, print(args).** Experiment with the various options, particularly -v. <li> Read the usage output in the docs, what option must you implement? Go ahead and implement it. Test with print() for now. <b>Commit the change.</b><li> Investigate the `parse_userparse_for_user()` function, with the <code>usage_data_file</code>. This **In main, call `parse_for_user()` with `output` as the argument. Investigate what's returned.**<li> `parse_for_user()` should take the list of lines from the file, and instead return a list of usernames. **In main, print the title header and the output.** <b>Commit the change.</b><li> Use argparse with **Once you have `output`-l user-> ` parse_for_user()`usage__data_file` --> correct output being printed, use if conditions to call the print only when `parse_user()-l user` function. <b>Commit is in the changecommand line arguments.</b>** <li> Write a function to print the list from `parse_for_user()`. Now you have input -> processing -> output. <b>Continue committing these changes as your proceed.</b>
<li> Implement the same things as parse_for_user but for `parse_for_hosts`. Output should be sorted.
<li> Compare your output with the output below.

Navigation menu