Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is description of what you are supposed to modify: 1. Use the getopt module

ID: 3628738 • Letter: T

Question

This is description of what you are supposed to modify:
1. Use the getopt module to parse stdinput and set a few parameters. (e.g --help --version --verbose etc)

2. Use the logging module to write a log file that keeps track of stdout and stderr

3. Write a socket server in your main function and handle the socket connections using multiple processes, use the try/except statement to try to send/recv from the socket.

Here is the code:

import socket
import threading
import multiprocessing
import select
import getopt
import logging

class mythread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
pass

class myprocess(multiprocessing.Process):
def __init__(self):
multiprocessing.Process.__init__(self)
def run(self):
pass

def main():

if __name__=="__main__":
main()

Explanation / Answer

think carefully

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote