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

python µÄÄÚǶtimeÄ£°å·­Ò뼰˵Ã÷

CSDNÕ¾ÄÚתÌû£º
http://blog.csdn.net/kiki113/archive/2009/03/28/4033017.aspx
python µÄÄÚǶtimeÄ£°å·­Ò뼰˵Ã÷
  
Ò»¡¢¼ò½é
  timeÄ£¿éÌṩ¸÷ÖÖ²Ù×÷ʱ¼äµÄº¯Êý
  ˵Ã÷£ºÒ»°ãÓÐÁ½ÖÖ±íʾʱ¼äµÄ·½Ê½:
       µÚÒ»ÖÖÊÇʱ¼ä´ÁµÄ·½Ê½(Ïà¶ÔÓÚ1970.1.1 00:00:00ÒÔÃë¼ÆËãµÄÆ«ÒÆÁ¿),ʱ¼ä´ÁÊÇΩһµÄ
       µÚ¶þÖÖÒÔÊý×éµÄÐÎʽ±íʾ¼´(struct_time),¹²ÓоŸöÔªËØ£¬·Ö±ð±íʾ£¬Í¬Ò»¸öʱ¼ä´ÁµÄstruct_time»áÒòÎªÊ±Çø²»Í¬¶ø²»Í¬
    year (four digits, e.g. 1998)
    month (1-12)
    day (1-31)
    hours (0-23)
    minutes (0-59)
    seconds (0-59)
    weekday (0-6, Monday is 0)
    Julian day (day in the year, 1-366)
    DST (Daylight Savings Time) flag (-1, 0 or 1) ÊÇ·ñÊÇÏÄÁîʱ
    If the DST flag is 0, the time is given in the regular time zone;
    if it is 1, the time is given in the DST time zone;
    if it is -1, mktime() should guess based on the date and time.
    ÏÄÁîʱ½éÉÜ£ºhttp://baike.baidu.com/view/100246.htm
    UTC½éÉÜ£ºhttp://wenda.tianya.cn/wenda/thread?tid=283921a9da7c5aef&clk=wttpcts
    
¶þ¡¢º¯Êý½éÉÜ
1.asctime()
  asctime([tuple]) -> string
  ½«Ò»¸östruct_time(ĬÈÏΪµ±Ê±Ê±¼ä)£¬×ª»»³É×Ö·û´®
        Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.
        When the time tuple is not present, current time as returned by localtime()
        is used.
        
2.clock()
  clock() -> floating point number
  ¸Ãº¯ÊýÓÐÁ½¸ö¹¦ÄÜ£¬
  ÔÚµÚÒ»´Îµ÷ÓõÄʱºò£¬·µ»ØµÄÊdzÌÐòÔËÐеÄʵ¼Êʱ¼ä£»
  ÒÔµÚ¶þ´ÎÖ®ºóµÄµ÷Ó㬷µ»ØµÄÊÇ×ÔµÚÒ»´Îµ÷Óúó,µ½Õâ´Îµ÷ÓõÄʱ¼ä¼ä¸ô
  
  ʾÀý£º
v


Ïà¹ØÎĵµ£º

pythonµÄһЩ²Ù×÷

# coding=gb2312
# ÓÃÖÐÎÄ×¢ÊÍǰÎñ±Ø¼ÓÉϵÚÒ»ÐÐ
# ÇóÄ£ÔËËã·û£¬ºÍCÓïÑÔÒ»Ñù
print 10%9
# ÕûÊýÏà³ýÈÔÈ»ÊÇÕûÊý
print 5/2
# 2ºó¼ÓÉÏ.¾Í±ä³É¸¡µãÊýÁË
print 5/2.
# **±íʾÇóÃÝÔËËã
print 7**4
# º¯ÊýÓÃʱҪ¼ÓÉÏmodule.function
import math
print math.floor(19.8)
# º¯ÊýÃûÒ²¿ÉÒÔ³ÉΪ±äÁ¿
func = math.floor
......

Python GTK+ ¿ª·¢Îĵµ

1. Building an Application with PyGTK and Glade
2. Creating a GUI using PyGTK and Glade
3. A Beginner's Guide to Using pyGTK and Glade
4. Is there a walkthrough on getting PyGTK2 and libglade2 to work on win32 ......

Pythonѧϰ±Ê¼Ç ¸ß¼¶Ö÷Ìâ

1.ÁбíµÄµÝ¹é---ÓÃÓÚÊä³öÁбí×Ö·û´®ÖеÄÿ¸öÔªËØ >>> def printList(L):
    #Èç¹ûΪ¿Õ£¬Ôòʲô¶¼²»×ö
    if not L:
        return
    #Èç¹ûÊÇÁ´±í£¬Ôò¶ÔµÚÒ»¸öÔªËØµ÷ÓÃprintListº¯Êý
 & ......

Python Import»úÖÆ±¸Íü(ת)

Python Import»úÖÆ±¸Íü(ת)
   ×î½üÔÚ¿´¡¶PythonÔ´ÂëÆÊÎö¡·£¬¶ÔPythonÄÚ²¿ÔËÐлúÖÆ±ÈÒÔǰÁ˽âµÄ¸üÉîÈëÁË£¬¸Ð¾õ×Ô¼ºÓлú»áÒ²¿ÉÒÔ×ö¸öСÐ͵Ķ¯Ì¬½Å±¾ÓïÑÔÁË£¬ºÇºÇ£¬µ±È»
ÊÇ´µÅ£ÁË¡£Ä¿µÄµ±È»²»ÊÇ´´ÔìÒ»¸ö¶¯Ì¬ÓïÑÔ£¬Ä¿µÄÖ»ÓÐÒ»¸ö£º¸üºÃµÄʹÓÃPython¡£¿´µ½Ä£¿éµ¼ÈëÄÇ¿éµÄʱºò£¬ÖÕÓÚ¶ÔÄ£¿éµ¼Èë»úÖÆ±È½ÏÁ˽âÁË£¬ÒÔ·ÀÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ