Python£ºÇë½ÌTkÖÐradiobutton¿Ø¼þµÄÁ½¸öÊôÐÔ×÷ÓÃ
ÇëÏÈ¿´ÏÂÃæµÄ¼òµ¥´úÂ룺
Python code:
from tkinter import *
root = Tk()
v = IntVar()
v.set(0)
for i in range(3):
Radiobutton(root,
variable = v,
value = i).pack()
root.mainloop()
ÎÊÌ⣺
1¡¢Radiobutton¿Õ¼äÖеÄvariableÊôÐÔºÍvalueÊôÐÔ·Ö±ðÆðµ½Ê²Ã´×÷Óã¿
2¡¢variableΪʲô¸³ÖµÎªv£¬È»ºó¸øv¸³ÖµÎª0£¬¿ÉÒÔÕý³£¹¤×÷£¬µ«ÊÇÈç¹ûÖ±½Ó¸øvariable¸³ÖµÎª0£¬¾Í²»ÐÐÁËÄØ£¿
лл£¡
value Ö¸¶¨µÄÊÇ RadioButton ¹ØÁªµÄÖµ
Python code:
Command-Line Name: -value
Database Name: value
Database Class: Value
Specifies value to store in the button's associated variable whenever
this button is selected.
variable Ö¸¶¨µÄÊÇ RadioButton Ñ¡ÖÐʱÉèÖõıäÁ¿Ãû£¬Õâ¸ö±ØÐëÊÇÈ«¾ÖµÄ±äÁ¿Ãû£¬Óà 0 ¿Ï¶¨ÊDz»ÐеÄ
Python code:
Command-Line Name: -variable
Database Name: variable
Database Class: Variable
Specifies name of global variable to set whenever this button is selected.
Changes in this variable also cause the button to select or deselect itself.
Defaults to the value selectedButton.
ллÄãµÄÖ¸½Ì£¬²»
Ïà¹ØÎÊ´ð£º
ËÍÆ¼öÒ»±¾Ñ§Ï°PYTHONµÄÊ飬лл
¡¶python¼òÃ÷½Ì³Ì¡·£¬¡¶pythonºËÐıà³Ì¡·
×÷Ϊϵͳ¹ÜÀí·½Ãæ£¬¡¶Python UNIXºÍLinuxϵͳ¹ÜÀíÖ¸ÄÏ¡·ÊDZ¾·Ç³£²»´íµÄÊé¡£
http://club.book.csdn.net/pic3/255142.jpg
ÒýÓÃ
×÷Î ......
ÎÒÿ´ÎÉÏ´«µÄÎļþ¶Áµ½µÄÊý¾Ý¶¼²»ÕýÈ·¡£2M µÄͼƬ¶ÁµÃ10¶àK ¡£¡£ÄÄλ´óÏÀ¿ÉÒÔ°ï°ïÎÒ°¡¡£
#!D:\ProgrammerTools\python26\python.exe
#encoding=utf-8
import cgitb
import os
cgitb.enable()
import cgi,urllib ......
RT¡£
ÎÒÏëÒªÏÂÔØÒ»¸öÍøÕ¾ÉϵÄͼƬ£¬µ«ÊǸÃÍøÕ¾µÄͼƬµØÖ·ÊÇͨ¹ýä¯ÀÀÆ÷Ö´ÐÐÍøÒ³µÄJavaScript½Å±¾ºó²Å·µ»ØµÄ£¬Ê¹ÓÃurllib2µÄurlopenÖ»Äܵõ½´øÓÐJavaScript´úÂëµÄÍøÒ³Ô´´úÂë¡£
ÏëÒªÓÃwxÄ£¿éµÄwx.lib.iew ......
ÒÔÏ´úÂëÊÇTk×öÁËÒ»¸ö¼òµ¥µÄÃÜÂëÑéÖ¤¹¦ÄÜ£¬ÊäÈëÒ»¸ö×Ö·û´®£¬²¢ÑéÖ¤ÆäÊÇ·ñÕýÈ·£¬ÇëÏÈ¿´´úÂ룺
Python code:
from tkinter import *
root = Tk()
e = StringVar()
t = 'cashlu'
def yanzheng():
if e ......
Python code:
class Rectangle:
def __init__(self, width, height):
self.width = width
self.height = height
def paint(self, factory):
point = factory.getPoint()
......