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("", 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
相关文档:
import sys
import os
import datetime
import time
class ArgsDealwith:
def arg_environment(self, args):
filepath = ('PYTHON_PATH', 'path')
for i in filepath:
&nbs ......
http://blog.chinaunix.net/u1/59571/showart_1901962.html
1. 在Python中使用中文
在Python中有两种默认的字符串:str和unicode。在Python中一定要注意区分“Unicode字符串”和“unicode对象”的区别。后面所有的“unicode字符串”指的都是pyt ......
http://www.cppblog.com/jacky2019/archive/2007/05/17/24269.html
c++中嵌入python入门1
本人是用vc2003+python2.5学习的,其它的也应该差不了多少
0. 坏境设置
把python的include/libs目录分别加到vc的include/lib directories中去。另外,由于python没有提供debug lib,体地说,就是没有提供python25_d.lib了。你可 ......
>>> a = {'1':'2'}
>>> b = {'3':'4'}
>>> a+b
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported operand type(s) for +: 'dict' and 'dict'
>>> a.update(b)
>>> a
{'1': '2', '3': '4'} ......
(转)[Python 学习]2.5版yield之学习心得
在 shhgs 发布了关于《 Py 2.5 what's new 之 yield》之后,原来我不是特别关注 yield 的用法,因为对于2.3中加入的yield相对来说功能简单,它是作为一个 generator 不可缺少的一条语句,只要包含它的函数即是一个 generator 。但在2.3中,generator 不能重入,不能在运行� ......