I'm new to Python and I have a simple Tkinter program that logs you into your Gmail account and checks with the server to authenticate your login it looks like this
from EmailServer import CheckServer
from Tkinter import *
import smtplib
win = Tk()
usr = Label(win, text="Username")
psw = Label(win, text="Password",)
username = Entry(win)
password = Entry(win, show="*")
def Login():
username1 = username.get()
password1 = password.get()
CheckServer(username1, password1)
b = Button(win, text="Login",command=Login)
quit = Button(win, text="Exit",command=exit)
quit.grid(row=2, column=1)
username.grid(row=0, column=1)
password.grid(row=1, column=1)
psw.grid(row=1, column=0)
usr.grid(row=0, column=0)
b.grid(row=2, column=0)
And it gets the CheckServer function from here
def CheckServer(username,password):
import smtplib
server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(username,password)
print "checked"
but when I run it everything shows up but when i type everything in and press the login button it freezes up and stops responding I have no idea whats causing the the problem, any ideas?