易截截图软件、单文件、免安装、纯绿色、仅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):  
    ""
"  
  &


相关文档:

Python 线程池


import Queue, threading, sys
from threading import Thread
import time,urllib
# working thread
class Worker(Thread):
   worker_count = 0
   def __init__( self, workQueue, resultQueue, timeout = 0, **kwds):
       Thread.__init__( self, **kwds ) ......

Python监视进程


由subprocess创建一个进程,然后进行监视
每一秒钟查看一次,如果正在运行,打印pid和running,如果已停止,,继续执行任务并打印Termined
shell和stdout均设置为False
也许这对做病毒的守护进程很好
#!/usr/bin/env python
import subprocess , sys , time
p=subprocess.Popen(['ping','127.0.0.1','-n','10'], she ......

深入 GalCon:Python、游戏开发和人工智能

Alex. J. Champandard
赖勇浩(http://laiyonghao.com) 译
原文地址:http://aigamedev.com/open/interviews/inside-galcon-python-ai/
AiGameDev.com在这个周一的 pratical insights 是对Phil Hassey采访。Phil 是一个独立游戏开发者,也是游戏产业社区的活跃分子。他曾赢得2006年4月的 Ludum Dare 比赛(这个比赛关注 ......

(python)http://www.python.org/

中文简介
  Python (发音:[ 'paiθ(?)n; (US) 'paiθ?n ]n.蟒蛇,巨蛇 ),是一种面向对象的解释性的计算机程序设计语言,也是一种功能强大而完善的通用型语言,已经具有十多年的发展历史,成熟且稳定。Python 具有脚本语言中最丰富和强大的类库,足以支持绝大多数日常应用。它的名字来源于一个喜剧,也许最初设 ......

Python日期操作学习笔记

 http://www.itzn.cn/html/jiaoben/python-perl-VBA/200812/19-3283.html
字符串是使用静态的方式进行存储,只能读而不能直接修改字符内容。特别将一堆对字符串并在一起的时候,虽然可以直接相加,听说这样的速度奇慢,只有用其它函数的方式进行,好在也不太麻烦。
比如用 print ','.join(datelist)
就可以将date ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号