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.
ллÄãµÄÖ¸½Ì£¬²»
Ïà¹ØÎÊ´ð£º
ÔÚÎı¾ÎļþÖÐÆ¥ÅäÏî°üº¬ÖÐÎÄ
ÈçÄÚÈÝΪ£ºgamename=ÖÐÎÄ
key=ÌìÏÂ
Îı¾ÎļþµÄ±àÂëµÄÎļþΪutf-8
python´úÂëÈçÏ£º
# -*- coding:UTF-8 -*-
contents=open(from_pa ......
ÇëÎʸßÊÖ£¬pythonÀïµÄpopenÀàËÆjavaÀïµÄÄĸöÀà»òÕß·½·¨ÄØ£¿£¿ÁíÍâjython¿ª·¢java¸ÃÈçºÎʹÓÃjythonÄØ£¿£¿
1.¿ÉÄܺÍjavaÀïµÄRuntime.getRuntime().exec£¨"ϵͳÃüÁî"£©; Æô¶¯½ø³Ì
2.eclipseÏÂÔØjython ²å¼ ......
È磺
def aa(i):
print i
a=[1,2,3]
b=2
c=3
ÄÜʶ±ð³öÆðʼλdef aa(i):
ºÍ½áÊøÎ»" a=[1,2,3]"£¿
ÏñPython¶ÔÓï·¨ÕâôҪÇóÑϸñµÄÎÒ¾õµÃ¾Í²»ÒªÓÃÕýÔòÁË£¬Ð§Âʲ»¸ß¡£Ö±½ÓÓÃÅжϾͿÉÒÔÁË£¬Î ......
ʹÓÃxml.dom½âÎö¼¸Õ×µÄxmlÎļþ£¬·Ç³£»ºÂý£¬ÓÐÖÖ¼ÙËÀµÄ¸Ð¾õ¡£Ôõô½â¾ö£¿ÓÃÆäËû¿âÊÇ·ñ»áºÃЩ£¬ÔÝʱֻ֪µÀÕâ¸ö¿âµÄ¡£
Äã¿ÉÒÔÊÔÒ»ÏÂElementTree
pythonµÄ¹Ù·½Àý×Ó
import xml.parsers.expat
# 3 handler ......