2016年12月30日 星期五

2016年12月29日 星期四

send gmail

step 1:please read the policy of gmail http://stackoverflow.com/questions/20337040/gmail-smtp-debug-error-please-log-in-via-your-web-browser step 2: ex: http://stackoverflow.com/questions/17332384/python-3-send-email-smtp-gmail-error-smtpexception ex: no chinese in code http://johnisacoolboy.pixnet.net/blog/post/148222978-python-email%E5%AF%84%E4%BF%A1%E6%A8%A1%E7%B5%84%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F

2016年12月25日 星期日

OID Pen

principle: http://thps0612.blogspot.tw/2015/06/blog-post_23.html https://www.youtube.com/watch?v=A6yKZ1wjUgg https://www.youtube.com/watch?v=JViaNBbwpfQ https://www.youtube.com/watch?v=4AjvjFM8GzM

2016年11月30日 星期三

2016年11月25日 星期五

[Label] hover effort by using event

def callback_text(event):
    txt_keyword = event.widget.cget("text")
    idx_start = txt_keyword.find("https")
    idx_end = len(txt_keyword) - 1
    url = txt_keyword[idx_start : idx_end]
    webbrowser.open_new(url)
    event.widget.config(text = "X |" + txt_keyword)


def changeBGLeave(event):
    event.widget.config(fg="red")

def changeBGEnter(event):
    event.widget.config(fg="blue")




            lbl = Label(root,  text = txt_content , fg="blue", cursor="hand2")          
            lbl.pack(anchor="w")
            lbl.bind("<Button-1>", callback_text)
            lbl.bind("<Enter>",changeBGLeave)
            lbl.bind("<Leave>",changeBGEnter)


http://stackoverflow.com/questions/4299145/getting-the-widget-that-triggered-an-event

2016年11月21日 星期一