ʹÓÃpython½øÐе¥Ôª²âÊÔ
ÇëÎÊÔõô¶ÔÒÔÏÂÕâ¶Î´úÂë×öµ¥Ôª²âÊÔÄØ£¿£¨°üÀ¨Ê¹Ó÷¾¶¸²¸Ç¡¢Ìõ¼þ¸²¸ÇµÈ°×ºÐ²âÊÔ·½·¨£©
class Case_one:
def __init__(self):
self.__a = 100
self.__b = 200
def function_a(self):
if self.__a > 50 :
print "function_a"
self.__a = 200
else:
self.__a = 0
def function_b(self):
if self.__a == self.__b:
print "function_b"
elif self.__b < 150:
self.__a = 0
else:
self.__b = 0
def function_print(self):
print 'a is %d' %self.__a
print "b is %d" %self.__b
лл¡«¡«¡«
Èç¹û»¹ÓÐ
def function_c(self):
c = 0
c = self.__a+self.__b
print "a + b",c
Ó¦¸ÃÔõô²âÄØ
Ïà¹ØÎÊ´ð£º
ѧϰÓÃpython+tkдÁËÒ»¸ö¼òµ¥½Å±¾£¬ÓÃÀ´ÏÔʾһЩͼƬºÍÆä˵Ã÷£¬Éè¼Æ2¸ö°´Å¥À´·Ò³¡£¿Ø¼þ²ÉÓÃpack()·½Ê½£¬Ö÷´°¿ÚûÓÐÌØ±ðÖ¸¶¨³ß´ç£¬°´Ï·ҳ°´Å¥ºóÄÜ×Ô¶¯ÒÀ¾ÝÄÚÈÝ×Ô¶¯Ëõ·Å´óС£¬ÈçÔ¤ÆÚÉèÏë¡£²»¹ý±È½ÏÆæ¹ÖµÄÊÇ,Èç¹ûÓÃÊ ......
ÎÒÓÃÁËdef CreateMyDialog(self):
dlg = MyDialog(None, -1, ''.decode('utf8'), (300,300), (300,200), wx.DEFAULT_DIALOG_STYLE | wx.DIALOG_NO_PARENT )
&nbs ......
pythonºÍpyqtÒÔ¼°Eric4¶¼ÒѾÅäÖúÃÁË£¬´ò¿ªEric4д¸öpython³ÌÐò±ÈÈç¼òµ¥µÄ
print¡°hello£¬world¡±£¬Ôõô±àÒëÔËÐÐÁË£¬Start²Ëµ¥µÄËùÓÐÃüÁî¶¼³öÏÖºÍͼÖв¶àµÄ¶Ô»°¿ò£¬Ó¦µ±ÔõôÔËÐÐÁË£¿
Çó´ó¼ÒÖ¸½Ì
ûÓÐÈËÓà ......
ÇëÎÊÏ£¬ÎÒµÄÊÇpython2.5°²×°ÁËPILÄ£¿é£¬È»ºó±àд³ÌÐò´ò¿ª±¾»úÉϵÄÒ»¸öͼƬʱ£¬ÎªÊ²Ã´ÀϳöÏÖ´íÎóÄØ£¬ÀÏÊÇÕÒ²»µ½Í¼Æ¬£¬´íÎóÌáʾÈçÏ£ºFile "C:\Python25\Lib\site-packages\PIL\Image.py", line 1888, in o ......
·¢ÏÖpython2.6
import httplib
conn=httplib.HTTPSConnection('x.x.x.x')
conn.request('','')
rd=conn.getresponse()
conn.close()
ÕâÑù½áÊøºó»á±ä³ÉCLOSE_WAIT״̬£¬ÎÒ ......