才发现 Python 被和谐了
昨天在研究了几天PHP-GTK后,决定转向Python,因为Python具有多线程这个特点,在与系统交互方面也比较有优势,虽然我很喜欢PHP,PHP在网页方面也非常强大,但毕竟我不是搞网站开发的。
想下个Python吧,发现它居然被和谐了,太诡异了
唉,和谐有理,屏蔽无罪!
相关文档:
# 直接插入排序
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 > ......
#直接选择排序
def SelectSort(mylist):
size = len(mylist)
i = 0
for i in range(0, size):
k = i
for j in range(i + 1, size):
if mylist[j] < mylist[k]:
k = j
if k != i:
tmp = mylist[i]
......
我的环境是:Linux version 2.4.21-4.EL
(bhcompile@daffy.perf.redhat.com) (gcc version 3.2.3 20030502 (Red Hat
Linux 3.2.3-20)) #1 Fri Oct 3 18:13:58 EDT 2003 + Python2.6.4
本文结合我安装时候的问题,总结而成
用户目录如/home/liuguanyu/ , 保证用户有root权限
1,看看有没有安装
&nbs ......
1. Building an Application with PyGTK and Glade
2. Creating a GUI using PyGTK and Glade
3. A Beginner's Guide to Using pyGTK and Glade
4. Is there a walkthrough on getting PyGTK2 and libglade2 to work on win32 ......
1.列表的递归---用于输出列表字符串中的每个元素 >>> def printList(L):
#如果为空,则什么都不做
if not L:
return
#如果是链表,则对第一个元素调用printList函数
& ......