pythonÖлñµÃijÔÂÓжàÉÙÌìµÄº¯Êý
żȻÐèÒªÓõ½ÕâÑùÒ»¸öº¯Êý£¬ÔÚDelphiÖУ¬ÓÐÏֳɵĺ¯Êý¿ÉÒÔµ÷Óã¡ÔÚpythonÖУ¬ÎÒÕÒÁ˰ëÌì¶¼»¹Ã»ÕÒµ½£¬×îºó×Ô¼ºÐ´ÁËÒ»¸öº¯ÊýÈçÏ£º
def dayOfMonth(date):
if date.month == 12:
return 31
else:
return (date.replace(month=date.month+1, day=1) - datetime.timedelta(days=1)).day
ºóÀ´ÔÚ¹úÍâÍøÕ¾ÉÏ£¬Å¼È»·¢ÏÖÁËÒ»¸ö˵Ã÷£¬·¢ÏÖ£¬ÔÀ´£¬pythonÖл¹ÊÇ´øÓÐÕâÑùµÄº¯ÊýµÄ£¡
monthrange(year, month)
Returns weekday of first day of the month and number of days in month, for the specified year and month.
Õâ¸öº¯Êý¾ÍÊÇ£¬·µ»ØÐÇÆÚµÄÊýÁ¿ºÍ±¾ÔµÄÌìÊý£¬ÐèÒªÒýÓÃcalendar
>>>
import
calendar
>>>
calendar
.
monthrange
(
2002
,
1
)
(
1
,
31
)
>>>
calendar
.
monthrange
(
2008
,
2
)
(
4
,
29
)
>>>
calendar
.
monthrange
(
2100
,
2
)
(
0
,
28
)
Ïà¹ØÎĵµ£º
˵ʵ»°£¬PythonÕæµÄ²»Ì«ÊʺÏ×öÕâÖÖ¶þ½øÖƵĶ«Î÷£¬ÌìÉúûÓÐÖ¸Õ룬µ¼ÖÂÔÚC/C++ºÜÈÝÒ׵Ķ«Î÷ÔÚPythonϾͺÜÂé·³¡£²»¹ýºÃÏñ3.1ÓÐÁËÔÉúµÄbytesÀàÐÍ£¬²»ÖªµÀÄܲ»ÄܸıäÏÖ×´¡£
import sys
import time
import socket
import struct
import random
def SendPacketData (Buffer = None , DestIP = "127.0.0.1" , DestPort = 0 ......
½ñÌì¿´ÁËÐòÁÐÀàÐÍÏà¹ØµÄ±È½Ï²Ù×÷.
ÔÚpythonºËÐıà³Ì(2nd)Ò»ÊéÖÐ6.13.1Õ½ÚÖÐ, ¸ø³öÁËÁбí±È½ÏµÄÒ»¸ö×¼Ôò..
¸öÈ˸оõ»¹ÊDz»ºÜÍêÉÆ:
Èç¹ûɨÃèµ½Á½¸öÁбíÖе±Ç°±È½ÏÔªËØÊDz»¿É±È½ÏµÄ, ÄÇô·µ»ØÊ²Ã´??
ÎÒÓõÄÊÇpython2.6....
¶ÔÕâ¸öÎÊÌâ×öÁËһЩ²âÊÔ, ×Ô¼ºÄ¿Ç°¸Â¾øµ±±È½ÏÓöµ½ÉÏÊöÇé¿öʱ, ÊÇʹÓÃÁ½¸öÁбíµÄÄÚ´æµØÖ·ÖµÀ´±È½ ......
½ñÌì×öftpµÄ½çÃæ,×öµÄÏ൱ÓôÃÆ£¬ÅªµÃÐÄÇé¼°Æä²»Ë¬£¬ÔÚÍøÉÏËѵ½ËÀ¶¼²»ÖªµÀ¸ÃÔõô°ì£¬´òËãÃ÷ÌìÏÈ¿´¿´C£«£«
µÄÊÇÔõôŪµÄÔÙ˵¡£²»¹ý£¬ÏÖÔÚÎÒÏëдһϹØÓÚsocketµÄ±à³Ì¡£
ÏÈдһ¸öʱ¼ä·þÎñÆ÷°É£¬Ëû¼àÌý¶Ë¿Ú£¬²¢Çһ᷵»Ø ·þÎñÆ÷µÄʱ¼ä
server.py
#!/usr/bin/python
# Copyright (c) angelipin (angelipin@126.com)
import ......
ZoundryDocument
Python skin is known for its color variations and for its elasticity; it is
the warmest leather of the season and ideal for the manufacture of many luxury
goods. Sometimes natural patterns can be hidden when they're done in black, but
the finish here has a bit of a shine to it ......
¶þ½øÖÆÎļþÏÂÔØµØÖ·£º
SinaGetBook
Ч¹ûÈçͼ£º
´úÂ룺
#!/usr/bin/env python
#coding=utf-8
#!/usr/bin/env python
#coding=utf-8
import traceback
import sys
import wx
import re
import urllib
import wx.richtext as rt
import wx.lib.buttonpanel as bp
import Casing
import Debug
def trace_back ......