python²é¿´class²ÎÊý
Àà:
class Test:
def __init__(self,num1,num2):
print num1,num2
ÓÃʲôº¯ÊýÄܲ鿴 TestÀàÓÐÁ½¸ö²ÎÊý
ÄܲéÂð ËÖªµÀ
ÓÃdir ºÍinfoÖÇÄܲ鿴ÊôÐԺͷ½·¨
лл.................
Ïà¹ØÎÊ´ð£º
Python code:
class Rectangle:
def __init__(self, width, height):
self.width = width
self.height = height
def paint(self, factory):
point = factory.getPoint()
......
Python code:
p=[1,2,3,4,5,6]
while True:
for i in p:
if i==4:
p=[]
f=[9,8,7]
p.extend(f)
break
print i£¬',',
p. ......
#! c:\python26
# Filename: backup_ver1.py
import os
import time
source=[r'C:\test', r'C:\test1']
target_dir='D:\\back\\'
target=target_dir+time.strftime('%Y%m%d%H%M%S')+'.zip'
zip_command=" ......
×î½üÒ»¸öÏîÄ¿ÂíÉϾÍÒªÓÃPython±àÁË ´ó¼ÒÍƼö¸öIDE¡£¡£¡£
1 Ãâ·Ñ¡£¡£¡£
2 Ìå»ý×îºÃСһµã
3 ¹¦ÄÜÇ¿´ó
£¨ÅÅÃû²»·ÖÏȺ󡣡£¡£·Ï»°¡£¡££©
emacs,×î´óµÄÓŵãÊÇÒòΪ·ÇͼÐνçÃ棬ÓÃSSHÔ¶³ÌµÇ¼Ҳ¿ÉÒÔʹÓá£ËùÒÔ¿ÉÒÔÓ ......
Traceback (most recent call last):
File "C:\test.py", line 80, in <module>
cur.execute("update userdata set kb=0 where strAccountID='%s'" % name)
......