易截截图软件、单文件、免安装、纯绿色、仅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 IDE and GUI Framework for Windows

Pythonwin - Python IDE and GUI Framework for Windows.
Copyright 1994-2006 Mark Hammond
Python is Copyright (c) 2000-2008 ActiveState Software Inc.
Copyright (c) 2001-2008 Python Software Foundation.
All Rights Reserved.
Copyright (c) 2000 BeOpen.com.
All Rights Reserved.
Copyright (c) 1995-20 ......

Python完全新手教程

http://www.cppblog.com/oosky/archive/2005/10/11/639.html
Lesson 1 准备好学习Python的环境
Python 的官方网址:
www.python.org
点击下面连接就可以直接下载了,这里只提供了Windows下的Python。
http://www.python.org/ftp/python/2.4.2/python-2.4.2.msi
linux版本的我就不说了,因为如果你能够使用linux并安装 ......

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'} ......

python学习

 4、Tuples 元组
     元组和Lists相似,但它是immutable,初始化后不能改变其内容,这在程序中有时候很有用,可以用来防止定义的变量内容被意外改变。
5、Files 文件
    文件操作和c语言比较接近,下面只通过代码演示:
>>> f = open('data.txt','w')
>>> ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号