Live Dictionary v2 – Python Application

2

Hey guys, m back with something for which most of the people were waiting for. Here is the 2nd build of Live Dictionary which is again based on Python Programming Language. Also, my work will be available on my GitHub Repository

Changelog:

  • used class and object
  • background changed
  • added translation radio button
  • new frame for translate window
  • exceptions handled using messagebox event
  • translation can be performed on both the combobox
  • searches (.txt) can be saved to app path

Modules included:

  • tkinter (obviously)
  • PyDictionary
  • mtranslate

Continue reading

Live Dictionary – Python Application

0

Hey guys, I’m back with my all new stuff. I have created an application for windows using python programming language. The application is called Live Dictionary. There is nothing new in it but I have integrated some features as in, a user can search for three things i.e. Meaning, Antonyms and Synonyms of the word. Also, it allows to save your searched content in a text file which will be generated automatically in your current program folder.

Since the name only defines ‘Live’ i.e. it requires internet to search the content. Below are some screenies …

Continue reading

Gmail Mail Gui – Python Program

0

Hey guys i back after a long time with a new stuff.

I have created a simple Email Gui which can send an email but only for gmail users. Definately i will create and post a multipurpose email application but it then you guys try and create your own mailing window. It is all coded in simple python programming language, i have not used and structured programming or class and object method. I kept i simple and sorted.

The following modules and method i have covered up:

  • Tkinter module (for creating GUI)
  • SMTP module (for sending mail)
  • Functions (but obvious to call the logic written inside it)

*Note: Before using the application you have to Enable the Allow Less Secure Apps Option from setting > under Accounts and Import tab > Other Google Accounts Settings > Under Sign-In & Security tab > Connected apps and sites. Scroll a bit and there you will find the option to enable that.

Some Screenies down below and code (file is attached at the end of the article) :

gui_mail

 

Code:

from tkinter import *
import smtplib

f=Tk()
f.title(“Gmail Gui”)
send_email=StringVar()
send_pass=StringVar()
recv_email=StringVar()
msg_body=None
def layout():
menuBar=Menu(f)
menuBar.add_command(label=”Instructions”,command=instruct)
menuBar.add_command(label=”About”,command=about)
f.config(menu=menuBar)

sender_email=Label(f,text=”Sender’s Gmail ID: “)
sender_entry=Entry(f,textvariable=send_email,bd=3)
sender_pass=Label(f,text=”Sender’s Gmail Pass: “)
sender_passentry=Entry(f,show=’*’,textvariable=send_pass,bd=3)

receiver_email=Label(f,text=”Receiver’s Email: “)
receiver_entry=Entry(f,textvariable=recv_email,bd=3)

msg_label=Label(f,text=’Message’)
global msg_body
msg_body=Text(f,height=5,width=15,bd=3)

send=Button(f,text=’Send’,width=15,command=mail,bd=3)
cancel=Button(f,text=’Cancel’,width=15,command=destroy,bd=3)

sender_email.grid(row=0,column=0,padx=5,pady=3)
sender_entry.grid(row=0,column=1,padx=5,pady=3)
sender_pass.grid(row=1,column=0,padx=5,pady=3)
sender_passentry.grid(row=1,column=1,padx=5,pady=3)
receiver_email.grid(row=2,column=0,padx=5,pady=3)
receiver_entry.grid(row=2,column=1,padx=5,pady=3)
msg_label.grid(row=3,column=0,padx=5,pady=3)
msg_body.grid(row=3,column=1,padx=5,pady=3)
send.grid(row=4,column=0,padx=5,pady=3)
cancel.grid(row=4,column=1,padx=5,pady=3)
f.mainloop()

def destroy():
f.destroy()

def msg_box():
messagebox.showinfo(“Email Info”,”Mail Sent”)

def instruct():
messagebox.showinfo(“Instruction”,”switch ‘allow less secure apps’ to ON from\nhttps://myaccount.google.com/u/0/security?hl=en&pli=1#connectedapps\nbefore using the app!!”)

def about():
messagebox.showinfo(“About”,”This app is for only educational purpose\nCreated by Yagnesh Vakharia\nNon-Copywrite”)

def mail():
try:
if send_email.get()==”” or send_pass.get()==”” or recv_email.get()==””:
messagebox.showerror(“Error”,”Please enter the complete details.”)
else:
server=smtplib.SMTP(‘smtp.gmail.com’,587)
server.starttls()
a=send_email.get()
b=send_pass.get()
c=msg_body.get(‘1.0’,END)
d=recv_email.get()
server.login(a,b)
server.sendmail(a,d,c)
server.close()
msg_box()
except Exception as e:
print(e)
a=messagebox.askokcancel(“Error”,”Read instructions”)

layout()

 

So execute it and make sure you its for only educational purpose. Happy Programming. 

If you have any queries, more simplified programs or solutions then kindly comment below. Also you can Email me your doubts and queries related to program.

Thank You!

Attachment: Email_GUI.py

Email Spoofing

1

Email spoofing is the forgery of an email header so that the message appears to have originated from someone or somewhere other than the actual source. Email spoofing is a tactic used in phishing and spam campaigns because people are more likely to open an email when they think it has been sent by a legitimate source.

Hehehe…Copied from Google. But in simple words, Email Spoofing is just a creation of fake email message in which you can customize the Senders’s Name, Sender’s Email ID which is difficult to trace the details of the sender for a common people.

gettyimages-468701250-5734d64f5f9b58723db72015

Continue reading

File Handling – Python Program

3

Python provides basic functions and methods necessary to manipulate files by default. You can do most of the file manipulation using a file object.

So, today we will cover the file handling in python. Before you can read or write a file, you have to open it using Python’s built-in open() function. This function creates a file object, which would be utilized to call other support methods associated with it. So, in the below program we will create a menu for reading and writing a file. it will be a simple Menu for just reading and writing data.

Note: The text file should be there in the same folder for reading, where you have saved the program file. Also, write the filename with it’s extension for instance ‘demo.txt’.

Below is the output of the program, have a look and try by yourself. If you still cannot figure it out the then click on Continue Reading… for solution.

file_handling

Continue reading

Matrix Formation – C Program

0

A Matrix (plural Matrices) is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns.

For example, the dimensions of the matrix below are 2 × 3 (read “two by three”), because there are two rows and three columns.

{\displaystyle {\begin{bmatrix}1&9&-13\\20&5&-6\end{bmatrix}}.}

So, today we will create C Program of Matrix in which data will be taken from the user dynamically. I used to write C Programs in Code Blocks.

Also, we will perform Addition, Subtraction and Transpose of both the Matrix. The Program which I had created is simple to understand for beginners because i have used only following keywords in the code:

  1. Arrays (to store input data from user)
  2. Nested For Loop
  3. If Else Conditional Operators (to compare both the  matrix)

Below image is the output the program:

matrix

Matrix – C Program

Try to analyze the above given data and create the program from your own.

Failed? Click More below to get the Solution…

Continue reading

Number Sequence – Python Program

5

Here I am back with a new challenge for you guys.

Lets try to create a logic sequence of number in Python. Look at the below image.

num_seq

Number Sequence

The above logic sequence is created using following keywords:

  1. List
  2. Nested For Loop
  3. Print (of course)

Try to analyze the above given data and create the sequence from your own.

Failed? Click More below to get the Solution…

Continue reading