Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

第 10 章 Library

目錄

10.1. 日期與時間
10.2. Python 多綫程
10.2.1. threading 高級綫程介面
10.2.2. Lock 綫程鎖
10.2.3. Queue 隊列
10.3. syslog
10.3.1. udp client
10.3.2. udp server
10.4. Socket
10.4.1. UDP
10.4.1.1. UDP Server
10.4.1.2. UDP Clinet
10.5. Daemon
10.6. python-memcached
10.7. Pyro - Pyro is short for PYthon Remote Objects
10.8. Python Imaging Library
10.9. getopt – Command line option parsing
10.10. syslog
10.10.1. udp client
10.10.2. udp server
10.11. python-subversion
10.12. SimpleHTTPServer
10.13. fuse-python.x86_64 : Python bindings for FUSE - filesystem in userspace
10.14. Network
10.14.1. gevent - A coroutine-based network library for Python
10.15. TUI
10.15.1. Console
10.15.2. urwid
10.15.3. pycdk
10.15.4. python-newt - A NEWT module for Python
10.16. Python-spdylay - Spdylay Python Extension Module
10.17. mechanize
10.18. zope.testbrowser

10.1. 日期與時間

當前日期

import time	
dt = time.strftime('%Y-%m-%d.%X',time.localtime(time.time()))
print(dt)	
	
	
>>> import time 
>>> dt = time.strftime('%Y-%m-%d.%X',time.localtime(time.time()))
>>> print(dt)
2014-01-23.11:07:28