It is a desktop application made with socket programming in Python. It uses synchronous multithreading.
Python Libraries Required :
➔ Pandas
➔ Tkinter
➔ Socket
➔ Subprocess
➢ Programming : Python
➢ Connection : Socket Programming
➢ Protocol : TCP
➢ User Interface : python-tkinter
➢ Data Storage : Using CSV files
➢ Data Updates : python-pandas
➢ OS Calls : python-subprocess
-
Open terminal/command prompt on your PC.
-
Navigate to ‘Voting’ folder
-
Run command : "python homePage.py"
-
A new home page window should open. If this doesn’t happen, check your installations.
-
Login into Admin using given details in ‘How to Login’ part.
-
Click on the ‘Run Server’ Button.
-
Use the rest of the Buttons as per your need.
❖ Admin Login :
➔ Admin ID : Admin
➔ Password : admin
❖ Voter Login:
❏ Server should be running for voters to be able to login.
➔ Already registered voter I.Ds : 10001 to 10005
➔ Password (for already registered voters) : abcd
❖ Inorder Description to run & test this project :
-
Open terminal & run python homePage.py to open Home Page Window.
-
Log into Admin and press ‘Run Server’. This will run the Server in a new console window.
-
Now that the server is running, return to the admin home page window.
-
Press ‘Register Voter’ and enter details to register a new voter. Remember or note down the ‘Voter ID’ that you will receive on successful registration.
-
Press ‘Home’ to return to the Home. Now, press ‘Voter Login’ to open the voter login page.
-
Enter the login details and you are redirected to the Voting Page. You will receive an error message if the Voter is invalid or has already cast a vote.
-
Cast a Vote. Now on receiving a success message, press home to return to home.
-
Login into Admin again. Press ‘Show Votes’ to check the votes that all parties have received so far.
-
Return to Home. You can press ‘New Window’ to open multiple pages and cast a vote concurrently from multiple voters.
Home Page
Admin Login
Admin Home
Register Voter
Register Success Message
Voter Login
Test Case 1 : If detail matches, then it welcomes the voter and displays the name and poll symbol of the candidates
Voting Page
Vote Casted Successfully Message
Show Votes
❖ Error Handling :
If the vote already been casted
Error while casting vote
❖ Voters casting vote concurrently :
6 Voters
Voter Info Database
Candidate Info Database
For the ‘E-voting system’ project we learned how to implement TCP socket programming using Python. We also learned how to connect multiple clients with one server . As the requirement of the project was to allocate a new thread by server for every new incoming Client,thus to accomplish this requirement we learned how to implement synchronized multithreading in python and implemented it in the code of socket programming.