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

才发现 Python 被和谐了

昨天在研究了几天PHP-GTK后,决定转向Python,因为Python具有多线程这个特点,在与系统交互方面也比较有优势,虽然我很喜欢PHP,PHP在网页方面也非常强大,但毕竟我不是搞网站开发的。
想下个Python吧,发现它居然被和谐了,太诡异了
唉,和谐有理,屏蔽无罪!


相关文档:

python字典排序

python字典排序
1、 
准备知识:
在python里,字典dictionary是内置的数据类型,是个无序的存储结构,每一元素是key-value对:
如:dict = {‘username’:‘password’,‘database’:‘master’},其中‘username’和& ......

python算法实践1 直接插入排序

# 直接插入排序
def InsertSort(mylist):
size = len(mylist)
i = 1
for i in range(1, size):
if mylist[i] < mylist[i - 1]:
tmp = mylist[i]
j = i - 1
mylist[j + 1] = mylist[j]

j = j - 1
while j > ......

python算法实践4 快速排序

#快速排序
def Partition(mylist, low, high):
tmp = mylist[low]
while low < high:
while low < high and mylist[high] >= tmp:
high = high - 1
if low < high:
mylist[low] = mylist[high]
low = low + 1
while low < hi ......

python的一些操作

# coding=gb2312
# 用中文注释前务必加上第一行
# 求模运算符,和C语言一样
print 10%9
# 整数相除仍然是整数
print 5/2
# 2后加上.就变成浮点数了
print 5/2.
# **表示求幂运算
print 7**4
# 函数用时要加上module.function
import math
print math.floor(19.8)
# 函数名也可以成为变量
func = math.floor
......

用Python写的图片蜘蛛人


    写了个图片蜘蛛人玩玩,抓了几个网页试试,感觉不不错。核心的代码可能20行也不到,简洁明了,嘻嘻。废话少说,翠花,上代码~~
#coding=utf-8
import os
import sys
import re
import urllib
URL_REG = re.compile(r'(http://[^/\\]+)', re.I)
IMG_REG = re.compile(r'<img[^>]*?src=([ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号