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 ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ
ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......
ËÍÆ¼öÒ»±¾Ñ§Ï°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 ......
Òì³£´úÂëÈçÏ£º
write a file error: [Errno 2] No such file or directory: 'C:\x0cile.txt'
Traceback (most recent call last):
File "C:\Documents and Settings\USER\×ÀÃæ\¸´ ......
СµÜ½Ó´¥python 2¸öÐÇÆÚÁË£¬°²×°µÄÊÇpython3.1°æ¡£
ÎÒÓõÄÊÇwindows7£¬Ïëд¸öµ÷ÓÃdllµÄ³ÌÐòʵ¼ù¡£ÎÊÌâÀ´ÁË£º
C++´úÂ룺
extern "C" int __stdcall test();
int __stdcall te ......