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

python 1073

#Python
common iter query

def iquery(conn, sql, rowfactory=tuple, batch=1, *args, **kwgs): """在给定的数据库连接conn上执行sql(可带…

2015-10-06 251

#Python
Python 字符串操作(string替换、删除、截取、复制、连接、比较、查找、包含、大小写转换

去空格及特殊符号 s.strip().lstrip().rstrip(',') 复制字符串 #strcpy(sStr1,sStr2) sStr1 = 'strc…

2015-10-06 742

#Python
像素翻转

#coding=utf-8 class Transform: def transformImage(self, mat, n): res = [] for i in range(n…

2015-10-05 295

#Python
python处理ArcGIS多图层矢量裁剪

# -*- coding: utf-8 -*- #导入包 import arcpy import os import datetime startTime=datetime.dat…

2015-10-05 637

#Python
Python批量将word转html,并将html内容发布至网站。

#coding=utf-8 __author__ = 'zhm' from win32com import client as wc import os import time i…

2015-10-05 864

#Python
从订阅源下载图片的例子

__author__ = 'Saint' import os import urllib.request import json from html.parser import H…

2015-10-04 863

#Python
uwsgi

<uwsgi> <socket>127.0.0.1:9000</socket> <master/> <chdir>/im…

2015-10-03 121

#Python
python编写小程序(计算器)

#coding=gbk def yunsuan(userA,userB,operate): '运算函数' try: A = int(userA) B = int(userB) op…

2015-10-03 329

#Python
python 多态实例

# coding:utf-8 """ 多态(英语:Polymorphism),是指面向对象程序运行时,相同的消息可能会送给多个不同的类之对象, 而系统可依据对象所属类,引发对应类的…

2015-10-02 718

#Python
python继承练习

class Employee(object): """Models real-life employees!""" def __init__(self, employee_name…

2015-10-02 340

#Python
发送邮件,可带附件,可群发

# 这是发布本信息时的版本,请以github上的为主要参考 def send_email(login=None, mail=None, images=None, attachmen…

2015-10-01 195

#Python
python实现爬虫下载美女图片

#-*- coding:utf-8 -*- http://www.aichengxu.com import urllib2 import re import requests fr…

2015-09-30 441
1 17 18 19 20 21 90