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

python 1073

#Python
python压缩和读取.tar.bz2格式的压缩包

python可以通过tarfile模块压缩和解压.tar.bz2包 #压缩文件夹为 .tar.bz2 import tarfile import bz2 archive = tar…

2015-06-24 328

#Python
python多线程ping和arpping扫描工具

#/usr/bin/env python #--encoding=UTF-8-- #a simpl ping scaner import subprocess from threa…

2015-06-24 315

#Python
用PyQt实现透明桌面时钟小部件!

#coding=utf-8 ''' Created on 2012-4-6 @author: 大孟 ''' import sys from PyQt4 import QtGui, …

2015-06-24 946

#Python
Python 随机生成中文验证码

# -*- coding: utf-8 -*- import Image,ImageDraw,ImageFont import random import math, string…

2015-06-24 551

#Python
删除指定格式的文件

#!/usr/bin/python """ 2015.07.02 Clean all the genrated files during compile. Edited by Gr…

2015-06-23 361

#Python
使用Python27抓取模板之家的CSS模板

#!/usr/bin/env python # -*- coding: utf-8 -*- # by ustcwq # 2015-03-15 import urllib,urlli…

2015-06-23 679

#Python
python获得linux物理内存大小

python获得linux物理内存大小: import re def get_physical_memory_in_kb(): meminfo = open('/proc/memi…

2015-06-23 402

#Python
urllib2下载文件

#!/usr/bin/python # coding=utf8 import os import urllib2 dir = "/home/saint/demo/" url = "…

2015-06-22 151

#Python
一个简单python ftp客户端代码

#!/usr/bin/python # -*- coding: utf-8 -*- import ftplib import os import socket HOST = 'ft…

2015-06-20 850

#Python
python写的FTP简单上传下载文件

#!/usr/bin/env python # -*- coding: utf-8 -*- from ftplib import FTP def ftp_up(filename =…

2015-06-20 658

#Python
python获取mp3文件信息

将代码生成.py文件放在目录下运行,可以获取该目录的所有mp3文件的信息,需要使用ID3库 import os, sys from ID3 import * files = os.…

2015-06-20 377
1 37 38 39 40 41 90