python
文章平均质量分 76
大鹏_
这个作者很懒,什么都没留下…
展开
-
centos python2.7安装setuptools\pip
centos安装setuptools\pip setuptools 是一组由PEAK(Python Enterprise Application Kit)开发的Python的distutils工具的增强工具,可以让程序员更方便的创建和发布 Python的egg 包,特别是那些对其它包具有依赖性的状况。 pip/easy_install,python的包管理器,相当于readhat的yum,原创 2017-01-09 15:51:37 · 3420 阅读 · 0 评论 -
centos安装python2.7
1、安装常用以来库 yum install sqlite-devel -y yum install readline-devel -y yum install bzip2-devel -y 2、下载python安装包 wget --no-check-certificate https://www.python.org/ftp/python/2.7.12/P原创 2017-01-09 15:38:28 · 341 阅读 · 0 评论 -
centos升级python导致yum无法使用
centos6升级了python的版本,导致yum运行出现No module named yum,而无法使用 现象: [root@localhost ~]# yum install http-devel -y There was a problem importing one of the Python modules required to run yum. The error lead原创 2017-01-10 17:58:21 · 1377 阅读 · 0 评论 -
robotframework自定义库用于非标准http协议请求
cache服务器通常都会支持一些非标准的http协议请求方法,比如purge请求,用于清除cache中的存储 一般这种非标准的http协议robotframework都不支持,所以需要写一些自定义库来支持 1、代码 --------------------------------------------------------------------------------原创 2017-02-04 10:17:21 · 780 阅读 · 0 评论 -
django查看某个group中的所有user
group = Group.objects.get(name='rd') users = group.user_set.all()原创 2017-06-16 13:38:31 · 3945 阅读 · 0 评论 -
django的sql返回结果QuerySets
调用django的sql方法,例如User.objects.all()通常会返回一个QuerySets>>> from django.contrib.auth.models import User, Group >>> print User.objects.filter(groups__name='cache-qc') <QuerySet [<User: si.li>, <User: san.zh原创 2017-06-16 13:45:55 · 1649 阅读 · 0 评论 -
python命名规范-google-styleguid
命名 Tip module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_VAR_NAME, instance_var_name, function_parameter_name, local_var_name. 应该避免的名称1. 单字符名称, 除了计数器和迭代器. 2.原创 2017-07-31 14:52:02 · 673 阅读 · 0 评论