摘要: 重启 #/etc/init.d/iptables restart 查看防火墙信息:#/etc/init.d/iptables status 关闭防火墙服务:#/etc/init.d/iptables stop 看了好几个页面内容都有错,下面是正确方法:#/sbin/iptables -I INPUT 阅读全文
posted @ 2017-02-16 14:40 Edwinma 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1.加载镜像 2.解压文件****.tar.gz #存放文件路径 tar -zxvf /压缩包路径 3.解压路径 ./***.pl tar xzvf /mnt/VMtools-8.4.6-385536.tar.gz -C /usr/src / /解压vmware-tool文件,解压到/usr/src 阅读全文
posted @ 2017-02-16 14:39 Edwinma 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 下载 http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz https://pypi.python.org/packages/source/s/setuptools/ setuptools 地址 进入 阅读全文
posted @ 2017-02-16 14:38 Edwinma 阅读(953) 评论(0) 推荐(0) 编辑
摘要: 1.字符串 s='Spam' s.find('a') 返回偏移量,找不到返回 -1 s.replace('a','xyz') 搜索全部,替换 s.split(',') 按‘,’切割成子字符串 s.upper() 全部转为大写字母 s.isalpha() 判断 isdigit etc s.rstrip 阅读全文
posted @ 2017-02-16 14:35 Edwinma 阅读(92) 评论(0) 推荐(0) 编辑
摘要: import urllib import os import re //地址 url= 'http://v.youku.com/v_show/id_XMTMwNjQ5ODQ3Mg==_ev_1.html?from=y1.3-idx-uhome-1519-20887.205805-205902.1-1 阅读全文
posted @ 2017-02-16 14:33 Edwinma 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 系统: win 7 64位 离线安装比较快捷,在线安装有时会提示网络问题 一. easy_install安装 下载压缩包 https://pypi.python.org/pypi/setuptools#files 解压, cmd 进入解压目录 执行 (python) setup.py install 阅读全文
posted @ 2017-02-16 14:32 Edwinma 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 先导入需要的lib from bs4 import BeautifulSoup from HTMLparser import HTMLparser 阅读全文
posted @ 2017-02-16 14:31 Edwinma 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1.安装 pip install virtualenv 2.在文件夹中创建虚拟环境: virtualenv venv 3.激活:Linux or Mac OS X $ source venv/bin/activate Windows $ venv\Scripts\activate 4.退出到pyth 阅读全文
posted @ 2017-02-16 14:30 Edwinma 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 跳转 from flask import redirect @app.route('/') def index(): return redirect('http://www.example.com') 阅读全文
posted @ 2017-02-16 14:29 Edwinma 阅读(86) 评论(0) 推荐(0) 编辑
摘要: psutil dnspython difflib difflib.Differ() difflib.HtmlDiff().make_file( text1, text2) filecmp 文件与目录差异 filecmp 文件、目录、遍历子目录 cmp(单文件)、cmpfiles(多文件对比)、dic 阅读全文
posted @ 2017-02-16 14:28 Edwinma 阅读(170) 评论(0) 推荐(0) 编辑