笔记
文章平均质量分 60
jeremy.li
这个作者很懒,什么都没留下…
展开
-
Can not connect to Service chromedriver
用webdriver调用浏览器的时候发生了错误 提示: raise WebDriverException(“Can not connect to the Service %s” % self.path) selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedri原创 2017-04-11 01:36:18 · 3381 阅读 · 0 评论 -
unicode字符转换成中文
我们返回数据的时候有时候会返回unicode格式的字符串,我们要把这种字符串转换成中文 具体要怎么做,看下面的案例:data = '\u5317\u4eac'print type(data)print datatype ‘str’ \u5317\u4eac 可以看到我们打印出来的结果是没有转换的字符串data = '\u5317\u4eac'print type(data)print原创 2017-04-11 02:08:51 · 16897 阅读 · 0 评论 -
centos7部署gitlab服务器问题汇总
安装gitlab服务是参考:http://www.cnblogs.com/wenwei-blog/p/5861450.htm以下总结在安装使用过程中遇到的问题及解决方法 1、其它ip无法访问,在本地访问127.0.0.1:8088或localhost:8088是正常的,但用其它机器访问该服务器地址就无法访问 ———CentOS7上启用了tomcat服务,关闭tomcat后正常 systemct原创 2017-04-11 02:24:13 · 3219 阅读 · 0 评论 -
python logging使用
参考:http://www.cnblogs.com/zhbzz2007/p/5943685.htmllogging是python自带的日志处理功能,可以方便的录入日志以及显示 logging的日志级别分别为critical、error、warning、info、debug、notset 默认级别为warning,意思就是默认打印warning和以上的级别 简单使用 import loggin原创 2017-04-15 18:25:35 · 1651 阅读 · 0 评论 -
python os读取最新创建的文件
有时会需要读取某文件夹下的最新文件,可以用python自带的os.listdir()和os.stat(),当然os还有许多的功能,这里不赘述 os.listdir() 获取文件内的所有文件 os.stat() 获取文件的基本状态属性#!/usr/bin/env python# -*- coding:utf-8 -*-import osfile_dir = './文件夹路径'file_dic原创 2017-04-15 22:51:33 · 3310 阅读 · 0 评论 -
python logging 日志配置
python 的logging功能可以用conf配置文件配置日志的输出和打印格 使用logging.config.fileConfig()来加载配置,所有的日志级别等等都可以用这种方式配置好,使用时直接加载就可以了import logging.configlogging.config.fileConfig('logging.conf')通过配置文件配置日志输出格式和方法# logging.co原创 2017-04-15 18:40:32 · 341 阅读 · 0 评论