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

python 1073

#Python
一个简洁的Python清理脚本

#coding:utf-8 ''' Created on Aug 31, 2015 @author: mac ''' import os,time,sys def remove(p…

2015-09-23 741

#Python
遍历制定目录下所有文件

#_*_coding:utf-8_*_ import os import glob def findall(folder): '''遍历指定后缀文件''' if os.path.e…

2015-09-23 152

#Python
python读取管道判断C盘是不是SSD

#python读取管道判断C盘是不是SSD #依赖开源工具smartmontool中的ssmartctl.exe #http://sourceforge.net/projects/…

2015-09-22 813

#Python
格式化字符串

>>> a,b=5,42 >>> print(a,b) 5 42 >>> 'this is {}, and that is {…

2015-09-22 679

#Python
o(n)时间复杂度替换字符串中空格为%20

class offer_book: def replaceBlank( p_str, rpl_str ): blank = ' ' numOfBlank = 0 originalL…

2015-09-21 362

#Python
ping网段设备

#!/usr/bin/env python #coding:utf-8 import os,time,random,threadpool,sys from progressbar …

2015-09-21 631

#Python
Python脚本-输出文件目录树

# 目录树 import os def travelTree(currentPath, count): if not os.path.exists(currentPath): re…

2015-09-21 409

#Python
新手初学Python实现某论坛自动签到功能

#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'poppy' ''' dakele bbs sigin ''…

2015-09-21 439

#Python
osx是否安装了iterm2

#/usr/bin/env python3 #coding: utf-8 import os def get_tools(): apppath="/Applications" to…

2015-09-21 602

#Python
python网络编程 一个例程(自娱自乐)

import Tkinter import socket class window: def __init__(self,root): label1=Tkinter.Label(r…

2015-09-21 924

#Python
Python对Excel进行读写

#coding:utf=8 __author__ = 'ZZ' import os import natsort from operator import itemgetter f…

2015-09-21 178
1 19 20 21 22 23 90