Home | Mirror | Search | 杂文 | ITEYE 博客 | OSChina 博客 | 51CTO 博客

第 9 章 Library

目录

9.1. 日期与时间
9.2. Python 多线程
9.2.1. threading 高级线程接口
9.2.2. Lock 线程锁
9.2.3. Queue 队列
9.3. syslog
9.3.1. udp client
9.3.2. udp server
9.4. Socket
9.4.1. UDP
9.4.1.1. UDP Server
9.4.1.2. UDP Clinet
9.5. Daemon
9.6. python-memcached
9.7. Pyro - Pyro is short for PYthon Remote Objects
9.8. Python Imaging Library
9.9. getopt – Command line option parsing
9.10. syslog
9.10.1. udp client
9.10.2. udp server
9.11. python-subversion
9.12. SimpleHTTPServer
9.13. fuse-python.x86_64 : Python bindings for FUSE - filesystem in userspace
9.14. Network
9.14.1. gevent - A coroutine-based network library for Python
9.15. TUI
9.15.1. Console
9.15.2. urwid
9.15.3. pycdk
9.15.4. python-newt - A NEWT module for Python
9.16. Python-spdylay - Spdylay Python Extension Module
9.17. mechanize
9.18. zope.testbrowser

9.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	
	
	
comments powered by Disqus