diff --git a/OpenWeather.jpg b/OpenWeather.jpg new file mode 100644 index 0000000..dd316ed Binary files /dev/null and b/OpenWeather.jpg differ diff --git a/WeatherApp.py b/WeatherApp.py new file mode 100644 index 0000000..620b4ca --- /dev/null +++ b/WeatherApp.py @@ -0,0 +1,173 @@ +from logging import root +from os import read +from pathlib import WindowsPath +from tkinter import * +import tkinter +from tkinter.ttk import * +import mysql.connector +import tkinter.messagebox as m +import smtplib +import random +from datetime import datetime +from PIL import Image, ImageTk +import requests +from tkinter import Tk +import re +import math + +from requests import api +def openlogwind(): + window1=Tk() + window1.geometry("600x600") + window1.title("WeatherData-Login") + window1.config(background="#B8B5FF") + sty=Style() + sty.configure('Btn.TButton', font =('Courier', 10, 'bold'),foreground = '#153B44',background="#29A19C") + label1 = tkinter.Label(window1, text="Login",background="#B8B5FF", foreground="#153B44",font=("Courier",25,"bold")).place(relx = 0.5,rely = 0.14,anchor = 'center') + label1 = tkinter.Label(window1, text="WeatherData-Easy & Accurate!",background="#B8B5FF", foreground="#153B44",font=("Courier",23,"bold")).place(relx = 0.5,rely = 0.28,anchor = 'center') + con = mysql.connector.connect(host="localhost", user="root",passwd="A@shishcricket100", database="weatherperson") + cursor = con.cursor() ###DOUBTSSSSSSSSSSS + username = Label(window1,text="Username:",foreground="#2B2B2B",background="#B8B5FF", font="Garamond 16 bold") + username.place(x=50,y=220) + email = Label(window1,text="Email:",foreground="#2B2B2B", background="#B8B5FF", font="Garamond 16 bold") + email.place(x=50,y=270) + password = Label(window1,text="Password:",foreground="#2B2B2B", background="#B8B5FF", font="Garamond 16 bold") + password.place(x=50,y=320) + e1 = Entry(window1,style='Ent.TEntry') + e1.place(x=150,y=220) + e2 = Entry(window1,style='Ent.TEntry') + e2.place(x=150,y=270) + e3 = Entry(window1,show="*", style='Ent.TEntry') + e3.place(x=150,y=320) + def checklog(): + cona=mysql.connector(host="localhost", user="root",passwd="A@shishcricket100", database="weatherperson") + cura=cona.cursor() + conb=mysql.connector(host="localhost", user="root",passwd="A@shishcricket100", database="weatherperson") + curb=conb.cursor() + cura.execute("select email from datareglog") + curb.execute("select password from datareglog") + em=e2.get() + ps=e3.get() + a1=[] + a2=[] + for x in cura: + a1.append(x) + for n in curb: + a2.append(n) + l=len(a1) + q=0 + while q