首页 软件开发 代码片段 python ( Page 41 )

python 1073

#Python
验证身份证是否符合规则

from urllib import urlencode import urllib2 import json url = 'http://api.uihoo.com/idcard…

2015-06-19 597

#Python
python 通关sleep函数等待到明天再执行

python 通关sleep函数等待到明天再执行 def waitToTomorrow(): """Wait to tommorow 00:00 am…

2015-06-18 280

#Python
python统计cpu的利用率

python统计cpu的利用率 #-*-coding=utf-8-*- import win32pdh import time # Counter paths PROCESSOR_…

2015-06-18 361

#Python
python xmlrpc实现文件传输的代码

服务器端 from SimpleXMLRPCServer import SimpleXMLRPCServer import xmlrpclib def python_logo():…

2015-06-18 418

#Python
python旋转图片的代码

# rotate an image counter-clockwise using the PIL image library # free from: http://www.py…

2015-06-18 611

#Python
python播放wav音频文件代码

# play a wave sound on a Windows Box # Python23 tested vegaseat 2/8/2005 import winsound i…

2015-06-18 928

#Python
python通过win32com库播放mp3文件

# Python supports COM, if you have the Win32 extensions # check your Python folder eg. D:\…

2015-06-18 815

#Python
python删除整个目录(目录非空)

python删除整个目录(目录非空),os.rmdir()只能删除空目录,下面的函数可以删除整个非空目录 import os import shutil def CleanDir(…

2015-06-18 751

#Python
python ftplib模块制作ftp客户端

#!/usr/bin/python #-*- coding:utf-8 -*- from ftplib import FTP #加载ftp模块 ftp=FTP() #设置变量 ft…

2015-06-18 339

#Python
wxpython开发的简单的gui计算器

# wxCalc1 a simple GUI calculator using wxPython # created with the Boa Constructor which …

2015-06-18 913

#Python
Python删除指定目录下的过期文件

import os import sys import time class DeleteLog: def __init__(self,fileName,days): self.f…

2015-06-18 611

#Python
python递归删除指定目录

''' @author: Administrator ''' #coding=utf-8 import os import shutil dir = "G://tmp//…

2015-06-18 255
1 39 40 41 42 43 90