-
python 与redis
所属栏目:[Python] 日期:2020-12-16 热度:134
table style="height: 30px; background-color: #afeeee; width: 1266px; ; width: 1266px;" border="0" tr td span style="font-size: 16px;"一、redis安装 /td /tr /table 源码安装: ? 1.wget ? 2.yum install gcc ? 3.tar zxvf redis-stable.tar.gz ? 4.[详细]
-
Python 使用Pillow模块生成验证码
所属栏目:[Python] 日期:2020-12-16 热度:111
1.安装 pip3 install pillow 2.使用步骤 生成验证码和验证字符串 绘制图片,将验证码放入session中 将图片返回给页面 3.代码demo PIL span style="color: #0000ff;"def span style="color: #000000;" get_chars_str(): span style="color: #800000;"''' span[详细]
-
ORM框架-SQLAchemy使用
所属栏目:[Python] 日期:2020-12-16 热度:192
table style="height: 30px; background-color: #afeeee; width: 1266px; ; width: 1266px;" border="0" tr tdspan style="font-size: 16px;" 一、ORM简介 /td /tr /table orm英文全称object relational mapping,就是对象映射关系程序,简单来说我们类似pyth[详细]
-
python 与rabbitmq
所属栏目:[Python] 日期:2020-12-16 热度:69
table style="height: 30px; background-color: #afeeee; width: 1266px; ; width: 1266px;" border="0" tr tdspan style="font-size: 16px;" 一、rabbitmq简介、安装 /td /tr /table 简介: MQ全称为Message Queue,?(MQ)是一种应用程序对应用程序的通信方[详细]
-
python与MySQL
所属栏目:[Python] 日期:2020-12-16 热度:160
table style="height: 30px; background-color: #afeeee; width: 1266px; ; width: 1266px;" border="0" tr tdspan style="font-size: 16px;" 一、python与mysql交互 /td /tr /table 因版本不同python操作mysql有两个模块,python3不再支持MySQL-python,模块[详细]
-
协程、 事件驱动介绍
所属栏目:[Python] 日期:2020-12-16 热度:75
table style="height: 44px; background-color: #afeeee; width: 1265px;" border="0" tr td 协程 ,又称微线程,纤程。英文名Coroutine。一句话说明什么是线程: 协程是一种用户态的轻量级线程 。 协程拥有自己的寄存器上下文和栈。协程调度切换时,将寄存[详细]
-
Select、Poll、Epoll、 异步IO 介绍
所属栏目:[Python] 日期:2020-12-16 热度:103
table style="height: 30px; background-color: #afeeee; width: 1266px; ; width: 1266px;" border="0" tr tdspan style="font-size: 16px;" 一、概念相关介绍 /td /tr /table 同步IO和异步IO,阻塞IO和非阻塞IO分别是什么,到底有什么区别?不同的人在不同[详细]
-
python中的Queue(队列)详解
所属栏目:[Python] 日期:2020-12-16 热度:121
table style="height: 30px; background-color: #afeeee; width: 1266px; ; width: 1266px;" border="0" tr tdspan style="font-size: 16px;" 一、Queue简介 /td /tr /table python中的队列分类可分为两种: 1.线程Queue,也就是普通的Queue 2.进程Queue,在[详细]
-
线程与进程
所属栏目:[Python] 日期:2020-12-16 热度:74
table style="height: 30px; background-color: #afeeee; width: 1266px;" border="0" tr td span style="font-size: 16px;"一、线程介绍 /td /tr /table 线程是操作系统能够进行运算调度的最小单位,它被包含在进程之中,是进程中的实际运作单位,一条线程[详细]
-
堡垒机之paramiko模块
所属栏目:[Python] 日期:2020-12-16 热度:161
table style="height: 30px; background-color: #afeeee; width: 1266px; ; width: 1266px;" border="0" tr tdspan style="font-size: 16px;" 一、paramiko简单介绍 /td /tr /table 场景预设: 很多运维人员平时进行维护linux/unix主机时候,无非通过ssh到相[详细]
-
网络编程基础
所属栏目:[Python] 日期:2020-12-16 热度:138
table style="height: 30px; background-color: #afeeee; width: 1266px; ; width: 1266px;" border="0" tr td span style="font-size: 16px;"一、socket /td /tr /table socket简介: Socket又称"套接字",应用程序通常通过"套接字"向网络发出请求或者应答[详细]
-
isinstance和issubclass、动态模块导入、异常处理
所属栏目:[Python] 日期:2020-12-16 热度:94
table style="height: 30px; background-color: #afeeee; width: 1266px;" border="0" tr tdspan style="font-size: 16px;" 一、isinstance和issubclass /td /tr /table isinstance:判断某个对象是否是某个类的实例,返回True或Flase issubclass:判断某个类[详细]
-
详解python中的__init__与__new__方法
所属栏目:[Python] 日期:2020-12-16 热度:182
一、__init__和__new__方法执行的顺序? 在中介绍了关于对象创建的过程,我们知道__new__方法先于__init__方法执行。 二、__new__方法是什么? 首先,我们先来看下下面的代码 = = ( (cls,*args,** ( super(person,cls). obj1 =person(span style="color: #80[详细]
-
python之面向对象
所属栏目:[Python] 日期:2020-12-16 热度:179
table style="height: 30px; width: 1132px; background-color: #afeeee; ; width: 1132px;" border="0" tr td span style="font-size: 16px;"一、面向对象基础 /td /tr /table 本文主要介绍python中的面向对象,分为面向对象基础和面向对象进阶。 编程范式[详细]
-
python基础7之python3的内置函数
所属栏目:[Python] 日期:2020-12-16 热度:170
官方介绍: python3:https://docs.python.org/3/library/functions.html?highlight=built#ascii python2:https://docs.python.org/2/library/functions.html?highlight=built#ascii 下面介绍python3中具体每个内置函数的使用方法及含义; >>> abs(-1 1>>>[详细]
-
python基础8之自定义模块、if __name__==__main__:解释
所属栏目:[Python] 日期:2020-12-16 热度:161
table style="height: 30px; width: 1132px; background-color: #afeeee; ; width: 1132px;" border="0" tr td span style="font-size: 16px;"一、自定义模块与使用 /td /tr /table python模块说明:类似于函数式编程和面向过程编程,函数式编程则完成一个功[详细]
-
python基础5之装饰器
所属栏目:[Python] 日期:2020-12-16 热度:149
内容概要: 1.python解释函数代码过程: python解释器从上往下顺序解释代码,碰到函数的定义代码块不会立即执行它,而是将其放在内存中,等到该函数被调用时,才执行其内部的代码块。 2.函数即“变量”: 函数的使用分为,函数的定义和函数的调用,调用方式是[详细]
-
python基础6之迭代器&生成器、json&pickle数据序列化
所属栏目:[Python] 日期:2020-12-16 热度:143
内容概要: 一、生成器 二、迭代器 三、jsonpickle数据序列化 table style="height: 30px; width: 1132px; background-color: #afeeee; ; width: 1132px;" border="0" tr tdspan style="font-size: 16px;"一、生成器generator /td /tr /table >>> [ i*2 i ra[详细]
-
python基础3之文件操作、字符编码解码、函数介绍
所属栏目:[Python] 日期:2020-12-16 热度:117
内容概要: 一、文件操作 二、字符编码解码 三、函数介绍 table style="height: 30px; width: 1132px; background-color: #afeeee; ; width: 1132px;" border="0" tr td span style="font-size: 16px;"一、文件操作 /td /tr /table 文件操作流程: 打开文件[详细]
-
python基础4之递归、lambda、深浅copy
所属栏目:[Python] 日期:2020-12-16 热度:61
内容概要: 一、递归 二、匿名函数 三、关于python中的深浅拷贝与赋值 table style="height: 30px; width: 1132px; background-color: #afeeee; ; width: 1132px;" border="0" tr tdspan style="font-size: 16px;" 一、递归 /td /tr /table 递归就是函数本身[详细]
-
python基础1之python介绍、安装、变量和字符编码、数据类型、输
所属栏目:[Python] 日期:2020-12-16 热度:105
开启python之路 table style="height: 30px; width: 1132px; background-color: #afeeee; ; width: 1132px;" border="0" tr td span style="font-size: 16px;"一、python介绍 /td /tr /table python简介: Python是著名的 (吉多·范罗苏姆)在1989年圣诞节期[详细]
-
python基础2之字符串、列表、字典、集合
所属栏目:[Python] 日期:2020-12-16 热度:103
table style="height: 30px; width: 1132px; background-color: #afeeee;" border="0" tr tdspan style="font-size: 16px; font-family: 'Microsoft YaHei';"一、python2 or python3 /td /tr /table 1.PRINT IS A FUNCTION Old: ,2*2 New: ( ,2*2 Old: x, Ol[详细]
-
Python中路径操作
所属栏目:[Python] 日期:2020-12-16 热度:183
div class="toc" p class="toc-title"目录 div class="toc-list" 3.4版本之前使用os.path模块,3.4版本之后建议使用pathlib模块 方法 解释 >>> from os import path>>> p = path.join('/usr','local/httpd/httpd.conf')>>> p'/usr/local/httpd/httpd.conf'>>[详细]
-
python中线程和进程(一)
所属栏目:[Python] 日期:2020-12-16 热度:141
div class="toc" p class="toc-title"目录 div class="toc-list" 进程:进程是计算机中程序正在执行的实例,是系统进行资源分配和调度的基本单位。 线程:也被称为轻量级进程,是程序执行流的最小单元。一个标准的线程由线程ID,当前指令指针,寄存器集合和[详细]
-
python中线程和进程(二)
所属栏目:[Python] 日期:2020-12-16 热度:173
div class="toc" p class="toc-title"目录 div class="toc-list" 线程同步,即线程之间协同工作,一个线程访问某些数据时,其他线程不能访问这些数据,直到该线程完成对数据的操作。 不同的操作系统实现的技术有所不同,有临界区(Critical Section)、互斥量([详细]
