Professional Documents
Culture Documents
Offline Dictionary Project in Python
Offline Dictionary Project in Python
Offline Dictionary Project in Python
PROJECT
REPORT
ON
'OFFLINE DICTIONARY'
CERTIFICATE
I hereby certify that the work is being presented the B Tech. Minor
Acknowledgement
I would also like thanking all the people who have helped us in
the project. Without their friendly help and guidance it was difficult
Last but not least, I pay my sincere thanks and gratitude to MR.
SHEKHAR CHANDER (HOD-CS) for his all-time support in
making my project successful. I am also thanks to all my
colleagues for their co-operation and support.
_ TABLE OF CONTENT
Chapter-I
1. Abstract
2. Technologies
● Python
● Python Interpreter
● Linux Command Line
● Software development Methodology.
Chapter-II
3. Project
_ ABSTRACT
ANWAR
Email : talhaanwar.anwar@gmail.com
Project Coordinator : MR.MADHAV SHARMA
Department of Computer Science
.
1. Problem Identification:-
As a language enthusiast, I always wanted that there should be
an app where I can store all the word I learn. I could store the
word in a file that would be too time consuming, error prone
and manual.
2. Solution :
To solve the problem I started creating an offline dictionary in
python. Using this app I can add new words learned with its
meaning automatically. The app also has a variety of other
features.
3. System Requirement
1. Tool: - Sublime editor, Bash shell, Web Browser.
2. Technology: - Python
3. Operating System: - Linux
4. Hardware: Can work in lowest of RAM and takes up KB's of
space.
4. Application Area:-
Personal Usage and Public Usage
5. Project Outcome :
● Automatic
● Less error prone
● New features can be easily added
6. Future Scope:
I can share the code on github and interested person can hack
and make it more better.
I am also planning to give it a GUI and make it available on
windows too.
7. References:
google.com
stackoverflow.com
python.org
Scope: The user can add word with their meaning or only
word whose meaning they currently they dont know. Apart
from this they can see all the words that have a meaning and
all the words that have no meaning.
2. Overall Description:
2. Software interfaces
Any Linux(debain) based operating system.
Python 2.7
3. Communications interfaces
None
4. Memory Constraints
No Constraints
_ TECHNOLOGY
1. Introduction to Python
History
In the beginning…
The Future
Python's userbase is vast and growing - it's not going away any
time soon. Utilized by the likes of Nokia, Google, and even NASA
for it's easy syntax, it looks to have a bright future ahead of it
supported by a huge community of OS developers. Its support of
multiple programming paradigms, including object-oriented
Python programming, functional Python programming, and
parallel programming models makes it a highly adaptive choice -
and its uptake keeps growing.
Characteristics of Python
Simple:
Easy to Learn
High-level Language
Portable
Due to its open-source nature, Python has been ported (i.e. changed to
make it work on) to many many platforms. All your Python programs
will work on any of these platforms without requiring any changes at all.
However, you must be careful enough to avoid any system-dependent
features.
You can use Python on Linux, Windows, Macintosh, Solaris, OS/2,
Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS,
Psion, Acorn RISC OS, VxWorks, PlayStation, Sharp Zaurus, Windows
CE and PocketPC !
Interpreted
This requires a little explanation.
A program written in a compiled language like C or C++ is translated
from the source language i.e. C/C++ into a language spoken by your
computer (binary code i.e. 0s and 1s) using a compiler with various flags
and options. When you run the program, the linker/loader software just
stores the binary code in the computer's memory and starts executing
from the first instruction in the program.
When you use an interpreted language like Python, there is no separate
compilation and execution steps. You just run the program from the
source code. Internally, Python converts the source code into an
intermediate form called bytecodes and then translates this into the
native language of your specific computer and then runs it. All this
makes using Python so much easier. You just run your programs - you
never have to worry about linking and loading with libraries, etc. They
are also more portable this way because you can just copy your Python
program into another system of any kind and it just works!
Object Oriented
Extensible
If you need a critical piece of code to run very fast, you can achieve this
by writing that piece of code in C, and then combine that with your
Python program.
Embeddable
You can embed Python within your C/C++ program to give scripting
capabilities for your program's users.
Extensive Libraries
The Python Standard Library is huge indeed. It can help you do various
things involving regular expressions, documentation generation, unit
testing, threading, databases, web browsers, CGI, ftp, email, XML,
XML-RPC, HTML, WAV files, cryptography, GUI(graphical user
interfaces) using Tk, and also other system-dependent stuff. Remember,
all this is always available wherever Python is installed. This is called
the "batteries included" philosophy of Python.
Besides the standard library, there are various other high-quality libraries
such as the Python Imaging Library which is an amazingly simple image
manipulation library.
How your python code gets executed?
Basically the way the programs are run is always the same. The
compiled code is interpreted. The way the programs are loaded
differs. If there is a current pyc file, this is taken as the compiled
version, so no compile step has to be taken before running the
command. Otherwise the py file is read, the compiler has to
compile it (which takes a little time) but then the compiled version
in memory is interpreted just the same way as always.
2. Python Interpreter
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> prompt = "guest"
>>> if prompt:
... print prompt
...
guest
>>>
To exit from the Python interactive prompt, we'll hit Ctrl+D under
linux ubuntu. Since the interactive prompt plays an important role
in the development of Python code, we would customize it for a
more efficient use. This is explained in the following paragraph.
File Commands
The following section lists the most important commands for file
management. It covers everything from general file administration
to the manipulation of file system ACLs.
File Administration
ls [options] [files]
If you run ls without any additional parameters, the program
lists the contents of the current directory in short form.
-l
Detailed list
-a
Displays hidden files
rm [options] files
Removes the specified files from the file system. Directories are
not removed by rm unless the option -r is used.
-r
Deletes any existing subdirectories
-i
Waits for confirmation before deleting each file
cd [options] [directory]
Changes the current directory. cd without any parameters
changes to the user's home directory.
mkdir [options] directory
Creates a new directory.
locate patterns
This command is only available if you have installed
the findutils-locate package. The locate command can find in
which directory a specified file is located. If desired, use wild
cards to specify filenames. The program is very fast, because it
uses a database specifically created for the purpose (rather
than searching through the entire file system). This very fact,
however, also results in a major drawback: locate is unable to
find any files created after the latest update of its database. The
database can be generated by root withupdatedb.
updatedb [options]
This command performs an update of the database used
by locate. To include files in all existing directories, run the
program as root. It also makes sense to place it in the
background by appending an ampersand (&), so you can
immediately continue working on the same command line
(updatedb &). This command usually runs as a daily cron job
(see cron.daily).
find [options]
With find, search for a file in a given directory. The first
argument specifies the directory in which to start the search.
The option -name must be followed by a search string, which
may also include wild cards. Unlike locate, which uses a
database, find scans the actual directory.
du [options] [path]
This command, when executed without any parameters, shows
the total disk space occupied by files and subdirectories in the
current directory.
-a
Displays the size of each individual file
-h
Output in human-readable form
-s
Displays only the calculated total size
free [options]
The command free displays information about RAM and swap
space usage, showing the total and the used amount in both
categories. See Abschnitt 18.1.6, The free
Command, (↑ Reference ) for more information.
-b
Output in bytes
-k
Output in kilobytes
-m
Output in megabytes
date [options]
This simple program displays the current system time. If run as
root, it can also be used to change the system time. Details
about the program are available in the date(1) man page.
Processes
top [options]
top provides a quick overview of the currently running
processes. Press H to access a page that briefly explains the
main options for customizing the program.
ps [options] [process_ID]
If run without any options, this command displays a table of all
your own programs or processes—those you started. The
options for this command are not preceded by hyphen.
aux
Displays a detailed list of all processes, independent of the
owner
Network
Miscellaneous
halt [options]
To avoid loss of data, you should always use this program to
shut down your system.
reboot [options]
Does the same as halt except the system performs an
immediate reboot.
clear
This command cleans up the visible area of the console. It has
no options.
Waterfall Model
FI
G
3.1
Waterfall Model
This model contains 6 phases:
Feasibility Study
The feasibility study activity involves the analysis of the problem
and collection of the relevant information relating to the product.
The main aim of the feasibility study is to determine whether it
would be financially and technically feasible to develop the
product.
Design
The goal of this phase is to transform the requirement
specification into a structure that is suitable for implementation in
some programming language.
_ CHAPTER-II
PROJECT
Objective:
Build an offline dictionary in python
Technolog Used:
• Python 2.7
• Command line
Features:
• Add a word
CONCLUSION:
GOALS: