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

pythonÖг£ÓÃÈÕÆÚ²Ù×÷×ܽá

http://hbszyandong.javaeye.com/blog/377199
# -*- coding: utf-
8
 -*-  
from datetime import
 datetime  
from datetime import
 date  
from time import
 strftime  
from time import
 strptime  
from datetime import
 timedelta  
def getCurDate():  
    ""
"Return value of the date"
""
  
    return
 date(datetime.now().year,datetime.now().month,datetime.now().day)  
  
def getCurTime():  
    ""
"Return value of the datetime"
""
  
    return
 datetime.now()  
      
def converDateTimeToStr(cdate,format='%Y-%m-%d %H:%M:%S'
):  
    ""
"  
    Convert datetime to String  
    cdata parameter must be the datetime or date of  
    Return value of the date string format(%Y-%m-%d)  
    ""
"  
    sdate = None  
    try
:  
        sdate = cdate.strftime(format)  
    except:  
        raise ValueError  
    return
 sdate  
  
def converDateToDateTime(fdate):  
    ""
"  
  &


Ïà¹ØÎĵµ£º

PEP 0263 Defining Python Source Code Encodings

 
PEP 0263
Defining Python Source Code Encodings
Python will default to ASCII as standard encoding if no other
encoding hints are given.
To define a source code encoding, a magic comment must
be placed into the source files either as first or second
line in the file, suc ......

[¶À¼Ò]Google½«ÏÞÖÆPythonÓïÑÔµÄÓ¦Óà ¿ª·¢ÉçÇøÈÈÒé

2009-11-16 
Collin WinterÊÇPythonÉçÇøһλÆľßÓ°ÏìÁ¦µÄ¿ª·¢Õߣ¬ËûÔøÊÇCPythonÏîÄ¿µÄºËÐÄ¿ª·¢ÕßÖ®Ò»¡¢Ò²ÔøÊÇUnladen Swallow£¨¼ûÎÄĩעÊÍ£©µÄºËÐÄ¿ª·¢Õߣ¬²ÎÓëÁ˺ܶàPythonÏîÄ¿µÄ¿ª·¢¡£½üÀ´´«ÎÅGoogle½«ÔÚÆäÐÂÏîÄ¿ÖÐÏÞÖÆPythonµÄʹÓã¬Îª´ËÓпª·¢Õߣ¨ÒÔK±íʾ£©ÔÚGoogle ÂÛ̳Öй«¿ªÑ¯ÎÊÁËCollin Winter£¬Collin Winte ......

Python¼¸ÖÖ²¢·¢ÊµÏÖ·½°¸µÄÐÔÄܱȽÏ

 
#!/Library/Frameworks/Python.framework/Versions/2.5/bin/python
# encoding: utf-8
import sys, time
import thread
 
SLEEP_TIME = 0.0001
 
def run_benchmark(n, m):
    # print(">> Python 2.5.1, stackless 3.1b3 here (N=%d, M=%d)!\n" % (n, m))
    lock ......

pythonÄ£¿éÖ®poplib: ÓÃpop3ÊÕÈ¡Óʼþ

 
À´Ô´£º ×÷Õߣºzhaoweikid ·¢²¼Ê±¼ä£º2007-07-04 ÔĶÁ´ÎÊý£º
    pythonµÄpoplibÄ£¿éÊÇÓÃÀ´´Ópop3ÊÕÈ¡ÓʼþµÄ£¬Ò²¿ÉÒÔ˵ËüÊÇ´¦ÀíÓʼþµÄµÚÒ»²½¡£
    POP3ЭÒé²¢²»¸´ÔÓ£¬ËüÒ²ÊDzÉÓõÄÒ»ÎÊÒ»´ðʽµÄ·½Ê½£¬ÄãÏò·þÎñÆ÷·¢ËÍÒ»¸öÃüÁ·þÎñÆ÷±ØÈ»»á»Ø¸´Ò»¸öÐÅÏ¢¡£pop3ÃüÁîÂëÈçÏ£º
¡¡ÃüÁ ......

PythonµÄ×Öµä²Ù×÷

 
PythonµÄ×Öµä²Ù×÷
PythonÌṩÁ˶àÖÖÓ¦ÓÃÓÚ×ÖµäµÄ²Ù×÷¡£ÒòΪ×ÖµäΪÈÝÆ÷£¬ÄÚ½¨lenº¯Êý¿ÉÒÔ½«×ֵ䵱×÷µ¥Ò»²ÎÊýʹÓÃÌýÇзµ»Ø×Öµä¶ÔÏóÖÐÏîÄ¿£¨¼ü£¯Öµ¶Ô£©µÄÊýÄ¿¡£
×Öµä»áÔ±
ÔÚPython2.2ÒÔ¼°ºóÃæ°æ±¾£¬DÖеÄkÔËËã·û¼ì²âÊÇ·ñ¶ÔÏókÊÇ×ÖµäDÖеļü¡£Èç¹ûÊÇ·µ»ØTrueÈç¹û²»ÊÇ·µ»ØFalse¡£ÏàËƵģ¬
Ë÷ÒýÒ»¸ö×Öµä
×ÖµäDÖеÄÖµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ