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

python 1073

#Python
生成随机MAC地址

import random Maclist = [] for i in range(1,7): RANDSTR = "".join(random.sample("012345678…

2015-10-28 918

#Python
文件拷贝

#coding:cp936 ''' Created on 2011-6-21 @author: tangly 文件拷贝 ''' import os def MyCopyFile(s…

2015-10-27 203

#Python
python计算肇事车牌照号

""" python计算肇事车牌照号 http://www.bathome.net/thread-16242-1-1.html 依山居 4:28 2015/11/25 """ #方…

2015-10-27 246

#Python
删除空文件夹

import os for root, dirs, files in os.walk(top, topdown=False): for name in dirs: try: os.…

2015-10-27 540

#Python
天涯帖子解放F5(只看楼主)

''' 天涯帖子直播 20150426 Python3.4.3 ''' import re,time,os import requests from bs4 import * he…

2015-10-24 385

#Python
非常简洁的快速排序法(python)

def quickSort (arr): """ Quicksort a list :type arr: list :param arr: List to sort :return…

2015-10-24 727

#Python
基础汇编->机器语言翻译器

#! -*- coding:utf8 -*- # Author: L****** # StudentNumber: 514******* # Class: F14***** # T…

2015-10-23 237

#Python
python字典取出文件倒数第N行.py

""" python字典取出文件倒数第N行.py http://www.bathome.net/thread-38591-1-1.html 依山居 7:44 2015/12/14 …

2015-10-23 126

#Python
下载png图标素材

 import re import os import urllib.request home = "http://sc.chinaz.com" def downIco(tit,…

2015-10-21 643

#Python
按日期对照片进行分类整理

# -*- coding:utf-8 -*- __author__ = 'Barry' from PIL import Image from PIL.ExifTags import…

2015-10-20 509

#Python
基本字符串压缩

class Zipper: def zipString(self, iniString): nlen = len(iniString) rest =[] i = 0 endflag…

2015-10-19 535
1 14 15 16 17 18 90