Python教程
Python是一种面向对象的解释型...
-
python通过pysftp加密上传、下载ftp服务器文件 python通过pysftp加密上传、下载ftp服务器文件 python">import pysftp import sys # Defines the name of the file for download / upload remote_file = sys.argv[1] srv = pysftp.Connect... 继续阅读python通过pysftp加密上传、下载ftp服务器文件
:2018-05-17
-
python编写登录接口 python">#!/usr/bin/env python # -*- coding:utf-8 -*- import getpass logintimes = 0 while logintimes < 3: name=raw_input("Please input your username:") pwd=getpass.getpas... 继续阅读python编写登录接口
:2018-05-17
-
python 抓取淘宝下拉框关键词 python">import urllib2,re for key in open('key.txt'): do = "http://suggest.taobao.com/sug?code=utf-8&q=%s" % key.rstrip() _re = re.findall('\[\"(.*?)\",\".*?\"\]... 继续阅读python 抓取淘宝下拉框关键词
:2018-05-17
-
python 购物 python">#!/usr/bin/env python import sys '''简单的购物菜单,根据输入的金额,减去选择的商品得到剩下的金额, 一旦省下的金额小于所有的商品价格,提示余额不足''' product = [] price = [] f = open('act.txt') for line in f.readlines(): p = lin... 继续阅读python 购物
:2018-05-17
-
python 分形图 python">#!/usr/bin/env python3 """ turtle-example-suite: tdemo_bytedesign.py An example adapted from the example-suite of PythonCard's turtle graphics. It's based on an... 继续阅读python 分形图
:2018-05-17
-
python 128进程,图片爬虫,增量更新,可作为标准组件 python">#!/usr/bin/env python import os import os.path import urllib import socket import imghdr from multiprocessing import Pool from urlparse import urlparse re... 继续阅读python 128进程,图片爬虫,增量更新,可作为标准组件
:2018-05-17
-
Python SMTP 发送纯文本 Pythonjiaocheng/20171102/553.html">python">from email.mime.text import MIMEText import smtplib import getpass msg = MIMEText('这是一封来自Pythonjiaocheng/20171102/553.html">pyt... 继续阅读Python SMTP 发送纯文本
:2018-05-17
-
python arp欺骗伪造网关代码 python">#coding:utf-8 ''' arp欺骗局域网pc,将伪造的网关mac以网关的arp应答发送给pc ''' from scapy.all import ARP,send,arping import sys,re stdout=sys.stdout IPADDR="192.168.1.*" gateway_ip='192.168... 继续阅读python arp欺骗伪造网关代码
:2018-05-17
-
python根据域名获得ip地址 python根据域名获得ip地址 python">def getIp(domain): import socket myaddr = socket.getaddrinfo(domain,'http')[0][4][0] print(myaddr) 其中domain为域名,如 www.sharejs.com,不能带http和ur... 继续阅读python根据域名获得ip地址
:2018-05-17
-
python通过pil将图片转换成黑白效果 pil功能强大,convert方法可以轻易的将图片转换,下面的代码可以将图片转换成黑白效果 from PIL import Image image_file = Image.open("convert_image.png") # open colour image image_file = image_file.convert('1') # con... 继续阅读python通过pil将图片转换成黑白效果
:2018-05-17