Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

python²é¿´class²ÎÊý

Àà:
class Test:
  def __init__(self,num1,num2):

  print num1,num2

ÓÃʲôº¯ÊýÄܲ鿴 TestÀàÓÐÁ½¸ö²ÎÊý
ÄܲéÂð Ë­ÖªµÀ
ÓÃdir ºÍinfoÖÇÄܲ鿴ÊôÐԺͷ½·¨

лл.................


Ïà¹ØÎÊ´ð£º

PYTHON Ò»¸ö³ÌÐò£¬23ÐÐÓÐ´í£¬²»Ã÷°×Ϊʲô ¾´ÇëÖ¸½Ì£¡

Python code:

class Rectangle:
def __init__(self, width, height):
self.width = width
self.height = height
def paint(self, factory):
point = factory.getPoint()
......

python list for Ñ­»·ÎÊÌâ

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

python Îļþ±¸·Ý´íÎó

#! 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

×î½üÒ»¸öÏîÄ¿ÂíÉϾÍÒªÓÃPython±àÁË ´ó¼ÒÍƼö¸öIDE¡£¡£¡£
1 Ãâ·Ñ¡£¡£¡£
2 Ìå»ý×îºÃСһµã
3 ¹¦ÄÜÇ¿´ó
£¨ÅÅÃû²»·ÖÏȺ󡣡£¡£·Ï»°¡£¡££©

emacs,×î´óµÄÓŵãÊÇÒòΪ·ÇͼÐνçÃ棬ÓÃSSHÔ¶³ÌµÇ¼Ҳ¿ÉÒÔʹÓá£ËùÒÔ¿ÉÒÔÓ ......

Çë½Ì¸öpython½Å±¾ÔËÐÐ×ÜÊÇËøËÀµÄÎÊÌ⣬Çë´ó´óÖ¸½Ì£¡

Traceback (most recent call last):
  File "C:\test.py", line 80, in <module>
  cur.execute("update userdata set kb=0 where strAccountID='%s'" % name)
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ