随笔分类 -  Python

core python applications
摘要:第三章: 3.4 电子邮件 SMTP, POP 和 IMAP 协议 第五章: 5.1~5.3 tkinter 各种控件简介 Listbox 阅读全文
posted @ 2016-12-23 14:50 一笙、 阅读(148) 评论(0) 推荐(0)
python3+ 模块学习 之 re
摘要:re 模块 参考:Python3 如何优雅地使用正则表达式(详解系列) Python3 正则表达式特殊符号及用法(详细列表) (出处: 鱼C论坛) 正则表达式 常用元字符:. ^ $ * + ? { } [ ] \ | ( ) \(元字符) 去除元字符的特殊功能,表示匹配正常字符 \(普通字符) 实 阅读全文
posted @ 2016-12-02 21:38 一笙、 阅读(1703) 评论(0) 推荐(0)
python3+ 模块学习 之 subprocess
摘要:subprocess 模块方法: call() check_call() check_output() 以上三个方法用于创建一个子进程,父进程等待子进程结束。若shell = true, 则shell 参数以字符串形式给出,否则,则以序列的形式给出。 Popen 对象: child = Popen( 阅读全文
posted @ 2016-11-30 15:08 一笙、 阅读(1360) 评论(0) 推荐(0)
用 pyvenv 创建几个不相互影响的python虚拟环境
摘要:IN MY UBUNTU python2的环境控制: sudo apt-get install virtualenv 创建: virtualenv --no-site-packages [环境搭建目录] python3的环境控制: sudo apt-get install python3-venv 阅读全文
posted @ 2016-11-27 23:01 一笙、 阅读(2444) 评论(0) 推荐(1)
python平台跨平台开发
摘要:有助于跨平台开发的 os 模块属性: linesep 用于在文件中分隔行的字符串 sep 用来分隔文件路径名的字符串 pathsep 用于分隔文件路径的字符串 curdir 当前工作目录的字符串名称 pardir (当前工作目录的)父目录字符串名称 阅读全文
posted @ 2016-10-04 16:17 一笙、 阅读(2163) 评论(0) 推荐(0)
小小收获for python
摘要:包导入问题: 包之外导入:还是按照sys.path的搜索路径进行模块的导入 包内的导入:python3.0+ 完全区分绝对导入和相对导入 from . import string #在本包内按相对路径搜索string模块 import string #按sys.path的绝对路径搜索string模块 阅读全文
posted @ 2016-09-26 21:33 一笙、 阅读(198) 评论(0) 推荐(0)
django 项目的文件说明
摘要:参见官方教程的mysite项目 mysite manage.py db.sqlite3 #数据库文件 mysite #项目文件夹 __init__.py settings.py urls.py views.py wsgi.py polls #APP文件夹 __init__.py admin.py a 阅读全文
posted @ 2016-09-09 10:26 一笙、 阅读(335) 评论(0) 推荐(0)
python 自学文档 str
摘要:创建str对象: 单引号: 'allows embedded "double" quotes' 双引号: "allows embedded 'single' quotes" 三引号: '''Three single quotes''', """Three double quotes""" #可存储跨 阅读全文
posted @ 2016-08-24 20:29 一笙、
windows下scrapy 的安装
摘要:2016-07-18 20:27:53 根据你的需求下载python安装包,安装python(本文基于python27)https://www.python.org/downloads/ 在 环境变量 "Path"中加入路径:"安装目录/python27/;安装目录/python27/Scripts 阅读全文
posted @ 2016-07-18 21:42 一笙、 阅读(12808) 评论(0) 推荐(0)