Python
Python
Sr.
Characteristic to be Poor Average Good Excellent
No.
assessed (Marks 1-3) (Marks 4-5) (Marks 6 - 8) (Marks 9-10)
(A) Process and Product Assesssment (Convert above total marks out of 6 marks)
1 Relevance to the Course
Literature Survey /
2
Information Collection
Completion of the Target as
3
per project proposal
Analysis of data and
4
representation
5 Quality of Prototype / Model
6 Report Preparation
(B) Individual Presentation / Viva (Convert above total marks out of 4 marks)
8 Presentation
9 Viva
Micro – Project Evaluation Sheet:
Process Assessment Product Assessment
Part Project Part Individual Total
A – project Methodology B – Project Presentation / Marks 10
Name of Student Proposal (2 marks) Report / Working Viva (4 marks)
(2 marks) Model(2 marks)
Chordiya Siddhi
Rajesh
Comments / Suggestions about team work / leadership / inter – personal communication (if any)
MICRO PROJECT
Academic year 2023-24
TITLE OF PROJECT
Website Blocker
CERTIFICATE
This is to certify that: 1) Chordiya Siddhi Rajesh
of 6th Semester of Diploma in Computer Technology of Institute, SHHJB POLYTECHNIC,
CHANDWAD (Code: 0079) has completed the Micro-Project satisfactorily in Subject
Programming With Python (22616)for the academic year 2024- 2025 as prescribed in the
curriculum.
Place: CHANDWAD
Date: / /2025
Part A
Part B 2
1.0 Aim/Benefits of the Micro-Project: The goal of the Website Blocker python project is to
ban certain websites from being accessed from any device. This project will assist the user in avoiding
distractions by preventing them from accessing web pages on their smartphone.The user may input
numerous websites to block in this Python Website Blocker Project, and then hitting the block button
will verify the condition that if the website has already been banned, it will print 'already blocked',
else it will block all of the websites and print 'blocked'.
The aim of a website blocker in Python is to help you control which websites you or others can
access on your computer. It's like setting up a virtual fence around certain websites to prevent
yourself or others from visiting them.If you want to focus on work or study without getting
distracted by social media or gaming sites, you can block those sites during specific times.If
you're a parent and want to make sure your kids don't access inappropriate content online, you
can block those types of websites.
4. 0 Resources Required:
Website Blocker
• Prerequisites for the project :-
The fundamental ideas of Python and the Tkinter library will be used to construct the
website blocker project.
Tkinter is a well-known Python GUI library. It is one of the quickest and most
straightforward methods to create GUI applications using Tkinter.
You may use the pip install command at the command line to install the library:
root = Tk()
root.geometry('500x300')
root.resizable(0,0)
We'll use the tkinter library to construct a window where we'll type our text to be
converted into voice.
The Label() widget is used to show one or more lines of text that users cannot change.
root – the name of our window text – the text that appears on the label font – the
typeface in which the text is written pack – the organized widget in block 3 Make a
widget for entry.
4. Create a function.
host_path ='C:\Windows\System32\drivers\etc\hosts'
ip_address = '127.0.0.1'
Websites = Text(root,font = 'arial 10',height='2', width = '40', wrap = WORD, padx=5, pady=5)
website lists website list(lists.split(,"")) returns a list of all the websites that users may
input. comma-separate the content of the lists, then convert it to a list and save it in a
website with open – When we are done using the file, the with open statement will
automatically terminate the file handler.
r+ will be used to read and write to a file.
Print a label with text previously blocked if the webpage is already in file content.
Otherwise, it will ban all of the specified websites and display a label that reads
'Blocked.'
def Blocker():
website_lists = Websites.get(1.0,END)
Website = list(website_lists.split(","))
file_content = host_file.read()
if website in file_content:
Label(root, text = 'Already Blocked' , font = 'arial 12 bold').place(x=200,y=200)
pass
else:
When we click the button, Button() is called, which is utilized to show the button on our
window command.
activebackground – specifies the color of the button's background when it is pressed.
6.0 Methodology:-
Source Code
root = Tk()
root.geometry('500x300')
root.resizable(0,0)
host_path ='C:\Windows\System32\drivers\etc\hosts'
ip_address = '127.0.0.1'
Label(root, text ='Enter Website :' , font ='arial 13 bold').place(x=5
,y=60)
def Blocker():
website_lists = Websites.get(1.0,END)
Website = list(website_lists.split(","))
file_content = host_file.read()
if website in file_content:
pass
else:
Developing a website blocker in Python helps you improve skills in Python programming,
networking concepts, web technologies, file handling, concurrency, user interface
development (if applicable), operating system interactions, error handling, debugging,
security concepts, testing, documentation, version control, and project management.\
9.0 Conclusion :-
In conclusion, developing a website blocker in Python is a highly beneficial project that enables
you to enhance your programming skills while delving into various aspects of software
development. Through this project, you'll gain proficiency in Python programming, networking
fundamentals, file handling, concurrency, system interactions, error handling, debugging,
security concepts, testing, documentation, version control, and project management. By
immersing yourself in this hands-on project, you'll not only sharpen your technical abilities but
also build a solid foundation for tackling more complex software engineering challenges in the
future.