if found: points+= 2 print( 'Executing single file transfers between server and client...' ) shell_command= 'cd server; py ../input-writer.py 1 3 server-file.txt 2>>errors.txt | py -u ../messenger_with_files.py -l 6001 >server-recvd.txt &' os.system( shell_command ) time.sleep( 1 ) shell_command= 'cd client; py ../input-writer.py 0 3 client-file.txt 2>>errors.txt | py -u ../messenger_with_files.py -l 6002 -p 6001 >client-recvd.txt' os.system( shell_command ) print( 'execution completed; grading...' ) differ= compare.binFiles( 'client/Ameca_splendens.jpg', 'server/Ameca_splendens.jpg' ) if differ is False: points+= 2 differ= compare.binFiles( 'client/one-liners.txt', 'server/one-liners.txt' ) if differ is False: points+= 2 shell_command= 'cd server; rm one-liners.txt' os.system( shell_command ) shell_command= 'cd client; rm Ameca_splendens.jpg' os.system( shell_command ) print( 'Executing multiple transfers between server and client...' ) shell_command= 'cd server; py ../input-writer.py 1 3 server-all.txt 2>>errors.txt | py -u ../messenger_with_files.py -l 6001 >server-recvd.txt &'
server = subprocess.Popen(args, stderr=server_errors) time.sleep(1) shell_command = 'cd client1; py ../input-writer-cmds-chat.py 1 3 5 client1-file.txt 2>>errors.txt | py -u ../ChatClient.py -l 6002 -p 6001 >client1-recvd.txt 2>>client1-errors.txt &' os.system(shell_command) shell_command = 'cd client2; py ../input-writer-cmds-chat.py 2 3 5 client2-file.txt 2>>errors.txt | py -u ../ChatClient.py -l 6003 -p 6001 >client2-recvd.txt 2>>client2-errors.txt &' os.system(shell_command) shell_command = 'cd client3; py ../input-writer-cmds-chat.py 3 3 5 client3-file.txt 2>>errors.txt | py -u ../ChatClient.py -l 6004 -p 6001 >client3-recvd.txt 2>>client3-errors.txt' os.system(shell_command) print('execution completed; grading...') differ = compare.binFiles('client1/one-liners.txt', 'client2/one-liners.txt') if differ is False: points += 2 else: print('client1 did not recieve one-liners.txt') differ = compare.binFiles('client2/Ameca_splendens.jpg', 'client1/Ameca_splendens.jpg') if differ is False: points += 2 else: print('client2 did not receive Ameca_splendens.jpg') differ = compare.binFiles('client3/Ameca_splendens.jpg', 'client1/Ameca_splendens.jpg') if differ is False: