
Python
菜鸟_大叔
为梦想的翅膀插上羽毛!
展开
-
Python连接Mysql&&解决数据库汉字显示乱码问题
__author__ = 'LG'# -*- coding:utf-8 -*-#!/usr/bin/python# 引入 MySQL 模組import MySQLdb# 連接到 MySQLdef query(ip,sql): db = MySQLdb.connect(host="192.168.0.55", user="root", passwd='comcatmysql'原创 2014-07-18 14:27:38 · 916 阅读 · 1 评论 -
Python读json文件,按条件过滤并移动文件
1、一次读取读取# -*- coding: UTF-8 -*-import codecsimport jsonimport osimport shutilfor root,dirs,files in os.walk('D:\ok\json'): for file in files: #os.rename(file,newfile) data_te原创 2014-07-30 16:41:45 · 2881 阅读 · 0 评论 -
Appium Python 输入中文
原文地址:http://www.nickli.pw/appium/13.html解决方案:在初始化的时候:desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '4.4.2' desired_原创 2015-11-05 10:04:52 · 1288 阅读 · 0 评论