Changes

Jump to: navigation, search

OPS435 A1 Usage Report Template

126 bytes added, 11:39, 14 March 2019
Usage Report Template
[[Category:OPS435]][[Category:rchan]]
= A1 Usage Report Template =
Please note that the following listing contains some actual python codes, but mostly are pseudo code.
<pre>
__author__ Raymond Chan
__date__ Feb 2018March 2019
__version__ 1.0
import sys
import time
 def menu(title,items,choice): ''' docstring for this function ''' selection = '' while selection not in choice: print(title) print('=' * len(title)) for item in items: print(item) selection = input('menu choice -->') return selectionimport argparse
def get_login_rec():
filter out the unwanted records
add filtered record to list (login_recs)'''
[ put your python code for this function here ]
return login_recs
filter out the unwanted records
add filtered record to list (login_recs)'''
[ put your python code for this function here ]
return login_rec
def cal_daily_usage(subject,login_recs):
''' docstring for this function
check number of subjects in login_recs if less than 10, display subject selection menu for each subject, process generate daily usagereport for the given dispaly daily usagesubject (user or remote host)''' [ put your python code for this function here ] return 0daily_usage
def cal_weekly_usage(subject,login_recs):
'''check number of subjects in login_recs if less than 10, display subject selection menudocstring for this function for each subject, process generate weekly usagereport for the given display weekly usagesubject (user or remote host)''' [ put your python code for this function here ] return 0weekly_usage
def cal_monthly_usage(subject,login_recs):
'''check numbe of subjects in login_recs if less than 10, display subject selection menudocstring for this function for each subject, process generate monthly usagereport fro the given display monthly usagesubject (user or remote host)''' [ put your python code for this function here ] return 0monthly_usage
if __name__ == '__main__':
import [ code to retrieve command line argument using the argparsemodule [ ... [ based on the command line option, call the appropriate functions defined about to read the login records, to process the login records to generate and print the requested usage report ] ...
</pre>
1,760
edits

Navigation menu