易截截图软件、单文件、免安装、纯绿色、仅160KB

python 帮助文档查看

 这个代码是基于python3.0写的,有许多不完善的地方,请自已修改。
# coding: utf-8
from tkinter import *
root = Tk()
root.title("python3.0查询")
#root.minsize(800,600)
#填充无用空间
Label(root).grid(ipady=5)
#11面板
class Frame11:
    def __init__(self, root):   #relief: SUNKEY,RIDGE,GROOVE,RAISED,FLAT,SOLID  
        frame = Frame(root, width=200, height=50, borderwidth=2, relief=GROOVE)
        frame.grid(row=2, column=1, sticky=W + S)
       
        self.keyLb = Label(frame, text="键入关键字:", font="Helvetica -12 bold")
        self.keyLb.grid(row=5, column=0, sticky=W + S)
        self.inputEn = Entry(frame, width=35)
        self.inputEn.__name__ = "inputEn"
        self.inputEn.grid(row=6, column=0)
        self.inputEn.bind("<Return>", self.frashAll)
   
   
    #根据用户的输入回车刷新所有相关联的显示组件:   
    def frashAll(self, event):
        frame21.keyLs.delete(0, END)
        frame21.frash()
       
        frame22.frash()
       
    #刷新自已的显示组件,由其它组件根据需要调用
    def frash(self):
        pass
       
  
#21面板    
class Frame21:
    def __init__(self, root):
        frame = Frame(root, width=200, height=300, bo


相关文档:

Python内建函数之——filter,map,reduce

     在讲述filter,map和reduce之前,首先介绍一下匿名函数lambda。
     lambda的使用方法如下:lambda [arg1[,arg2,arg3,...,argn]] : expression
     例如:
     >>> add = lambda x,y : x + y
>>> add ......

Python中文全攻略

http://blog.chinaunix.net/u1/59571/showart_1901962.html
1.        在Python中使用中文
在Python中有两种默认的字符串:str和unicode。在Python中一定要注意区分“Unicode字符串”和“unicode对象”的区别。后面所有的“unicode字符串”指的都是pyt ......

python两个dict相加


>>> a = {'1':'2'}
>>> b = {'3':'4'}
>>> a+b
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'dict' and 'dict'
>>> a.update(b)
>>> a
{'1': '2', '3': '4'} ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号