练习使用selenium来登入FB
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.facebook.com/')
driver.find_element_by_id('email').send_keys('E-mail')
driver.find_element_by_id('pass').send_keys('密码')
driver.find_element_by_name('login').click()
#driver.close()
使用tkinter模组制作GUI画面
import tkinter as tk
base = tk.Tk()
Label01 = tk.Label(base, text = 'Red', bg = 'red', font = ('Arial', 12), width = 20).pack()
Label02 = tk.Label(base, text = 'Green', bg = 'green', width = 20, height = 3).pack()
Label03 = tk.Label(base, text = 'Blue', fg = 'white', bg = 'blue', width = 20).pack()
base.mainloop()
base = tk.Tk()
textvar = tk.StringVar() # 设定一个tk的字串变数
Label01 = tk.Label(base, textvariable = textvar, fg = 'white', bg = 'red', font = ('Arial', 12), width = 20, height = 2).pack()
textvar.set('Hello World !!!')
base.mainloop()
# Radiobutton
import tkinter as tk
def select():
selection = 'Radio button ' + str(My_value.get()) + ' is chosen'
My_String.set(selection)
base = tk.Tk()
My_String = tk.StringVar()
My_value = tk.IntVar()
Button01 = tk.Radiobutton(base, text = 'Option01', variable = My_value, value = 1, command = select).pack()
Button02 = tk.Radiobutton(base, text = 'Option02', variable = My_value, value = 2, command = select).pack()
Button03 = tk.Radiobutton(base, text = 'Option03', variable = My_value, value = 3, command = select).pack()
Label01 = tk.Label(base, textvar = My_String).pack()
base.mainloop()
# Checkbutton
def leave():
base.destroy()
base = tk.Tk()
Choice01 = tk.IntVar()
Choice02 = tk.IntVar()
Choice03 = tk.IntVar()
CB01 = tk.Checkbutton(base, text = 'Math', variable = Choice01, offvalue = 0,onvalue = 1, ).pack(anchor = tk.W)
CB02 = tk.Checkbutton(base, text = 'Chinese', variable = Choice02, offvalue = 0,onvalue = 1, ).pack(anchor = tk.W)
CB03 = tk.Checkbutton(base, text = 'English', variable = Choice03, offvalue = 0,onvalue = 1, ).pack(anchor = tk.W)
Button01 = tk.Button(base, text = 'Submit', command=leave).pack()
base.mainloop()
<<: 掌握SEO优化3大要点,让搜寻引擎知道「我就是你要的网站!」
【前言】 本系列为个人前端学习之路的学习笔记,在过往的学习过程中累积了很多笔记,如今想藉着IT邦帮忙...
Formik 介绍 在进行实作之前,先来认识一下 Formik 吧~ 如标题所说,Formik 是一...
接续着昨天的进度,首先可以先准备你的程序,而我在github 上有放上范例: https://git...
在特定时间开放抢票的网站,常常会有流量爆炸的问题。这时候可以透过服务器的异步处理来解决。 让买票处理...
简单回顾一下,第一天讲了HTML5常用的几种tag。二到四天,深入聊了CSS中float原理,实作圣...