首页 > 新文章
  • Python中的daemon守护进程实现方法 is a project mainly written in , based on the .参考文档...

  • 通过python的ConfigParse模块读写ini配置文件 is a project mainly written in , based on the .python读写配置文件ConfigParser模块是python标准库自带的读取配置文件的模块.通过他可以方便的读取配置文件.目前示例代码中的Python版本都是基于2.7版本...

  • 在Ubuntu 14.04.3上安装python中的paramiko模块 is a project mainly written in , based on the .下面是安装命令 cd /usr/local/src git clone https://github.com/paramiko/paramiko.git cd paramiko sudo easy_install ./ 验证安装是否成功? 从截图易见paramiko模块的版本号是1.16.0, 从python中...

  • Python中*args 和**kwargs的用法探讨 is a project mainly written in , based on the .当函数的参数不确定时,可以使用*args 和**kwargs,*args 没有key值,**kwargs有key值。不确定的意思可以是有,有几个,也可以是没有...

  • 在Ubuntu 14.04 64bit上使用JBL Charge2+无线蓝牙音箱听歌指南 is a project mainly written in , based on the .音乐是我生活不可或缺的部分,而Ubuntu 14.04同样不离左右,我使用的ThinkPad T420顶配版外放音量比较小,不够满足我这种音乐发烧友的极致听歌感受,我决定使用时下便携蓝牙音箱来作为外放音乐,下面是使用JBL Charge2+和Thinkpad T420+Ubuntu 14.04整合听歌的详细设置过程。涉及的角色如下:...

  • 在CentOS 6.3 64bit上安装MySQL for python模块 is a project mainly written in , based on the .该源码包是MySQL-python-1.2.4b4.tar.gz 从2013-06-28以来一直没有更新,注意该网站可以区分访问的终端类型是Windows还是Linux之类的,从而返回的源码包格式不一样。 在CentOS上的安装方法是 http://www.cnblogs.com/jackluo/p/3559978.html...

  • Shell设置系统环境变量的问题 is a project mainly written in , based on the .业务场景: 我在一个bash脚本中修改了PATH变量的内容,并将其保存到/etc/profile文件中,同时执行了 source /etc/profile 但是当脚本退出时,我发现PATH变量还是没有修改生效,但是,如果我在命令行再直接执行 source /etc/profile 才发现PATH生效了。 请问,这是什么原因呢?...

  • 在CentOS 6.6 64bit上安装Python 3.5.0 is a project mainly written in , based on the .python 3在官网的最新版本是3.5.0,下面是我在CentOS 6.6 64bit上的安装过程实操: 1、下载python 3源码 # cd /usr/local/src/ # wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz 2、解...

  • 在Linux上利用python获取本机ip is a project mainly written in , based on the .下面介绍在Linux上利用python获取本机ip的方法. 经过网上调查, 发现大致有两种方法, 一种是调用shell脚本,另一种是利用python中的socket等模块来得到,下面是这两种方法的源码: #!/usr/bin/env python #encoding: utf-8 #description: get local...

  • ATS统计量proxy.node.client_throughput_out的单位调研 is a project mainly written in , based on the .proxy.node.client_throughput_out表示客户端字节吞吐量,那单位是什么呢? 我通过在SourceInsight中搜索ATS 5.3.1的源码,在traffic_shell.pl中找到相关线索,截图如下: 从中可以看到,proxy.node.client_throughput_out的单位是Mbps...

  • 在CentOS 6.3/6.6 64bit上源码安装cmake 3.4.0 is a project mainly written in , based on the .CMake主页是 https://cmake.org/download/ 1.安装必备包 yum install -y gcc gcc-c++ make automake ncurses-devel git wget curl 2.获取CMake最新64位源码包,当前版本号为3.4.0 wget https:...

  • 在CentOS 6.6 64bit上基于源码安装全功能的vim 7.4实录 is a project mainly written in , based on the .CentOS 6.6 64bit上默认的vim版本是7.2 minimal,通过下面的命令查看 yum list installed | grep vim 我打算将其卸载并重新安装官网最新版vim 7.4, 假设下面的操作都使用root权限进行 本次基于源码安装的vim 7.4要求具有如下特色: (1)支持python/lua...

  • 在CentOS 6.3 64bit上安装FTP服务器vsftpd 2.2.2 is a project mainly written in , based on the .ftp>quit...

  • 利用urllib2实现http post请求源码示例 is a project mainly written in , based on the .在python中利用urllib2或是pycurl都可以实现http POST请求功能,下面是源码: #!/usr/bin/env python #encoding: utf-8 #description: demo a simple post form #date: 2015-12-14import urllib, urllib...

  • 在CentOS 6.3 64bit上如何从源码生成rpm包? is a project mainly written in , based on the .具体例子参见《鸟哥私房菜》23.3.5中的例子,非常详细和经典!...

  • Python中的正则替换字符串函数re.sub is a project mainly written in , based on the .http://outofmemory.cn/code-snippet/8408/python-regular-expression-replace-sub-method   我验证了它的方法,可行...

  • Py-redis中的批量删除key方法 is a project mainly written in , based on the .py-redis中有个delete接口,既可以删除单个key,也可以批量删除key,后者的正确用法网上很少,我在实践中遇到该问题,特此记录一下。 网上的资料,大多都是这样的 r.delete('age') r.delete('sex', 'age') 正确的方法 keys = r.keys() r.delete(*keys...

  • Vim 7.4同时支持python 2.x和3.x问题调研 is a project mainly written in , based on the .如果你要在VIM中增加诸如YouCompleteMe这一类的插件的话,那么你需要VIM有Python的支持,这个是在一开始编译的选项里指定的。 我一开始怀着美好的愿望,希望vim能完美支持Python2和Python 3,所以,我在源码编译vim 7.4时加入了对Python这两个版本的支持。 另外,我也安装了YouComplet...

  • 在CentOS 6.3 64bit上安装libunwind库 is a project mainly written in , based on the .libunwind库为基于64位CPU和操作系统的程序提供了基本的堆栈辗转开解功能,32位操作系统不要安装。其中包括用于输出堆栈跟踪的API、用于以编程方式辗转开解堆栈的API以及支持C++异常处理机制的API。 64bit操作系统必须安装libunwind库 所有的libunwind库在 http://ftp.yzu.edu....

  • 在CentOS 6.6 64bit上升级GCC到4.8.2版本 is a project mainly written in , based on the .操作系统CentOS6.6 64bit上gcc原版本4.4.7,不能支持C++11的特性~,为了便于YouCompleteMe插件,我希望升级到4.8.2。不能通过yum的方法升级,需要自己手动下载安装包并编译,下面假定都是以root用户安装。 一、升级过程 1.获取gcc安装包并解压 gcc官网http://ftp.gnu.o...