首页 > 新文章
  • DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 is a project mainly written in , based on the .原来的python脚本是在Ubuntu 14.04 64bit上写的,运行没有问题,但是在CentOS 6.3上的crontab中定时执行时,每次都报 DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 脚本如下:...

  • 关于使用python logging模块的几点总结 is a project mainly written in , based on the .关于使用python logging模块的几点总结 使用python的标准日志模块logging可以非常方便地记录日志。Python日志系统非常丰富。添加结构化或非结构化日志输出到python代码,写到文件,输出到控制台,发送到系统日志,或者自定义输出格式都很容易。 下面是我实践过程中遇到的一些经验和教训的总结。 1. 一个简单...

  • Python中logging.config配置文件解读 is a project mainly written in , based on the .Python中logging.config配置文件解读 下面的函数用于配置logging模块,它们位于logging.config模块中。你可以使用这些函数来配置,也可以在logging或是logging.handlers中声明它们来配置。 logging.config.dictConfig(config)    从di...

  • 在Ubuntu 14.04 64bit上安装CHM阅读器KchmViewer 5.3 is a project mainly written in , based on the .kchmviewer是一款不错的开源软件,你可以使用它在linux系统下阅读chm格式的电子书。KchmViewer 作为一款使用Qt开发的程序,与KDE 桌面环境整合得很好。从语言兼容性上看,KchmViewer 支持包括中文、俄文等在内的多种语言。它不像有的CHM 阅读程序,仅仅支持几种很少的语言。在功能特性上,KchmViewe...

  • IndentationError: unexpected indent python is a project mainly written in , based on the .在CentOS 6.3 64bit上一个没有配置好的vim中,修改了一个python脚本,运行时就反复报错,说 IndentationError: unexpected indent python 怎么调整格式都不对,这才真正领教了python格式对齐的厉害。没方法只好用xshell将该文件转到原来的Ubuntu 14.04下面...

  • CentOS 6.3+Python 2.7.10安装pycurl遇到的问题汇总 is a project mainly written in , based on the .1.启动python中的pycurl模块出现如下问题: ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other) 解决方法:没有指定环境变量,卸载后重新安装...

  • 在CentOS 6.3/6.5 64bit上为python 2.7.10安装pycurl模块 is a project mainly written in , based on the .公司线上都是使用CentOS 6.3 64bit版本,我家里装的是CentOS 6.6,它们默认的python版本是2.6.6.而我编写的几个python脚本是在Ubuntu 14.04 64bit上默认的python 2.7版本开发的。昨天晚上为了搭建好一个测试项目的环境,我想将python 2.6.6升级到2.7.10最新版,同时...

  • CentOS 6.3 64bit上升级系统默认Python 2.6.6到2.7.10版本 is a project mainly written in , based on the .从官网下载python 2.7的当前最新版本源码 wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz tar zxvf Python-2.7.10.tgz cd Python-2.7.10 ./configure --prefix=/usr/...

  • 在Ubuntu 14.04 64bit上安装批量图片处理器XnConvert is a project mainly written in , based on the .XnConvert是一个免费的跨平台的批量图片处理工具,支持Windows,Linux和Mac系统。 官网地址:ttp://www.xnview.com/en/xnconvert/ 我最喜欢的地方是,它能一个文件夹内的图片进行批量转换,比如转换图片格式,调整大小等等,许多功能还请自己去发掘吧。 下面记下我的安装过程,以作备忘:...

  • 在Ubuntu 14.04 64bit上安装Master PDF Editor 3.2.81 is a project mainly written in , based on the .该软件对个人及家庭免费,但是商用需要付费。 该软件令人称奇之处是可以将pdf生成图片,能编辑pdf,能加水印,加密之类,更多功能请自己动手去发掘。 官网地址 https://code-industry.net/free-pdf-editor/ 依赖条件 Qt 4.6及以上,安装方法请查看我前面相关的博文 安...

  • 在Ubuntu 14.04 64上安装gevent_zeromq-0.2.5 is a project mainly written in , based on the .近来研究gevent协程高并发框架甚为痴迷,看到gevent tutorial中有个gevent_zeromq有关的例子,十分高兴,打算照着做一遍,发现安装gevent_zeromq非常麻烦。 经过一番折腾和试验,成功解决,特记录如下: 1.安装相关依赖库(可能不是必须的): sudo apt-get install g++ b...

  • Python-eggs异常解决方法 is a project mainly written in , based on the .在使用gevent过程中总是遇到如下python-eggs显示异常的问题:  UserWarning: /home/taoyx/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename....

  • 在Ubuntu 14.04 64bit上安装思维导图工具XMind is a project mainly written in , based on the .这是一款对个人免费的工具,提供了一些基本功能,如果你需要更多功能,可以付费购买Pro版本。 从下面的官网地址下载64bit的deb包 http://www.xmind.net/download/linux/ 下面完成后,Ubuntu软件管理中心会自动安装 这是安装后的截图,目前没有购买序列号激活,只能使用免费版本...

  • 利用python获取指定url在ATS中缓存对象的信息 is a project mainly written in , based on the .wget -S "http:/192.168.0.102:8080/cache/lookup_url?url=http://www.dnion.com/"...

  • 在Ubuntu 14.04 64bit上安装StarUML 2.5版本 is a project mainly written in , based on the .StarUML是来自韩国的一个优秀的UML绘图软件, 原来是免费软件, 现在需要付费购买.当然免费使用功能会有诸多限制. 它支持Windows, Linux和Mac OS等平台. 下面是我在Ubuntu 14.04 64bit上的安装实录. 去官网下载64bit的deb安装包, 当前最新版本是2.5 http://staruml...

  • ATS中开启Refer防盗链功能 is a project mainly written in , based on the .ATS默认提供了对Referer头的http request的防盗链功能,主要应用于图片,对视频等会使用级别更高的防盗链功能,比如事先约定好key,采用md5或HMAC-Sha1算法加密等。 在remap.config中按如下格式设置: map_with_referer client-URL origin-server-URL re...

  • Python中利用lxml模块解析xml文件报错XMLSyntaxError: Opening and ending tag mismatch is a project mainly written in , based on the .今天在代码中第一次使用lxml解析xml文件时出错了, XMLSyntaxError: Opening and ending tag mismatch: keyEffectiveDate line 21 and keyEffectiveData, line 21, column 80 截图如下 而我的xml文件是这样的...

  • Ubuntu 14.04 64 bit上开启nscd服务缓存加速及清除dns缓存 is a project mainly written in , based on the .简介 linux本身是没有dns缓存的,想使用dns缓存的话需要自己安装一个服务程序NSCD(name service cache daemon).  Nscd会缓存libc接口(比如 getpwnam(3), getpwuid(3), getgrnam(3), getgrgid(3), gethostbyname(3))发起的名...

  • 在Ubuntu 14.04 64bit上安装下载管理器FlareGet 4.2.92 is a project mainly written in , based on the .FlareGet 是一个全功能,多线程,跨平台的下载管理器和加速器,有点类似于uGet,它是一个Linux下的共享软件,有些扩展功能需要购买才能安装使用。FlareGet支持批量下载,可与多种浏览器关联,其最大的亮点是可以抓取网页上的视频。 官网地址: http://flareget.com/ 目前最新版本是4.2.92...

  • 在Ubuntu 14.04 64bit上使用网络诊断工具mtr is a project mainly written in , based on the .简介 mtr是 Linux中有一个非常棒的网络连通性判断工具,它结合了ping, traceroute,nslookup 的相关特性。 mtr可以做路由图供我们分析哪里出现故障或者是否存在有网络拥塞的情况 安装方法 sudo apt-get install traceroute sudo apt-get install...