随笔分类 - Python
摘要:一、Django流程 Django是使用python编写的web框架,遵守MTV设计思想。 实现原理: 1,浏览器发起请求。 2,Django根据URL Conf指向view(Views) 3,view进行数据操作(Models) 4, 页面的具体渲染交予模版处理(Templates) 5, 浏览器
阅读全文
摘要:一、Python安装 在Mac系统下,系统自带python开发环境,打开终端,输入python,我们就可以看到当前python版本号,例如我的系统是OS X EI Caption 10.11.1,自带的python版本是2.7。 目前python已经更新到3.6,因为python3和python2做
阅读全文
摘要:一、网络爬虫 网络爬虫又被称为网络蜘蛛(🕷️),我们可以把互联网想象成一个蜘蛛网,每一个网站都是一个节点,我们可以使用一只蜘蛛去各个网页抓取我们想要的资源。举一个最简单的例子,你在百度和谷歌中输入‘Python',会有大量和Python相关的网页被检索出来,百度和谷歌是如何从海量的网页中检索出你想
阅读全文
摘要:// 8 day(2016/8/11) 38. In python , it is oop. class Baskball: def setName(self, name): self.name = name def kick(self): print('my name is %s' % self.
阅读全文
摘要:35. In python, file operation syntax is similar to c. open(file,'r',……) //the first parameters is necessary, other is optional ,the second parameters
阅读全文
摘要://sixth day to study python(2016/8/7) 32. In python , there are have an special type dictionary , it is same with oc. such as: dicOne = {'wyg':'write
阅读全文
摘要://fourth day to study python 24. In python , how to create funcation. we can use def to define funcation. such as: def MyFirstFuncation(): print('this
阅读全文
摘要://this is my first day to study python, in order to review, every day i will make notes (2016/7/31) 1. In python , there are many bulit-in funcation.
阅读全文