Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1366161
  • 博文数量: 185
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2664
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-01 13:46
个人简介

鸟在笼中,恨关羽不能张飞;Survival of the fittest

文章分类

全部博文(185)

发布时间:2015-05-01 13:40:35

pycurltest.txt把附件pycurltest.txt改为pycurltest.py即可使用方法为 python pycurltest.txt www.abc.com写的并不是多标准,只是给大家一个在测试IDC等地点速度的一个参考工具......【阅读全文】

阅读(7077) | 评论(1) | 转发(1)

发布时间:2015-01-20 16:55:50

直接贴代码了目前这个环境啥也没有,批量改点东西实在是太费劲,根据以前的改改了,用着还行。#coding:utf-8import paramiko,threading,Queue,socketqueue = Queue.Queue()thread=3ips=open('ip').readlines()username='liuxin'port=58789pk_path='/Users/liuxin/.ssh/id_rsa'.........【阅读全文】

阅读(3713) | 评论(0) | 转发(0)

发布时间:2014-09-04 15:47:59

下面这个小工具包含了 判断unicode是否是汉字,数字,英文,或者其他字符。 全角符号转半角符号。 unicode字符串归一化等工作。 还有一个能处理多音字的汉字转拼音的程序,还在整理中。#!/usr/bin/env python# -*- coding:GBK -*-"""汉字处理的工具:判断unicode是否是汉字,数字,英文,或者其他字符。全角符号转半角.........【阅读全文】

阅读(3973) | 评论(0) | 转发(0)

发布时间:2013-11-20 18:42:08

东西很简单,可扩展性很大import multiprocessingimport time,os,mathdef func(msg):    output=os.popen("ssh %s hostname" %(msg)).read()    print outputif __name__ =="__main__":    flist=open('b').readlines()    pool =multiprocessing.Pool(processes=7).........【阅读全文】

阅读(4548) | 评论(0) | 转发(0)

发布时间:2012-06-16 11:26:11

httplib实现了HTTP和HTTPS的客户端协议,一般不直接使用,在python更高层的封装模块中(urllib,urllib2)使用了它的http实现。import httplibconn = httplib.HTTPConnection("google.com")conn.request('get', '/')print conn.getresponse().read()conn.close()复制代码.........【阅读全文】

阅读(9766) | 评论(1) | 转发(1)

发布时间:2012-05-16 11:03:24

Python中的fileinput模块和tempfile模块fileinput模块提供处理一个或多个文本文件的功能, 可以通过使用for..in来循环读取一个或多个文本文件内容.import fileinputimport sysimport globimport stringfor line in fileinput.input("test.txt"):     #处理一个文本文件  &n.........【阅读全文】

阅读(5362) | 评论(0) | 转发(2)

发布时间:2012-05-16 10:15:11

所需软件:python2.7.tar.bz2paramiko-1.7.7.1.tar.gz pycrypto-2.3.tar.gz  所需文件内容格式为:IP,sshPort,Username,Password 执行:python2.7 脚本名 结果:直接看我51的博客吧,仅限制于这个文章   有些朋友可以考虑到密码明文的.........【阅读全文】

阅读(6711) | 评论(5) | 转发(4)
给主人留下些什么吧!~~

电影vs程序员2013-08-22 18:01

学习一下。。。

回复  |  举报

烈岩沙尘2013-07-14 15:59

学习一下。。。

回复  |  举报

hainnu2013-04-01 23:56

学习了,留个脚印

回复  |  举报
留言热议
请登录后留言。

登录 注册