Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | 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	
	
	
comments powered by Disqus