gratuitous python3 python arp

python中dict.copy()用法

# 浅拷贝和深拷贝 浅拷贝:只会对最表层的进行拷贝,也就是相当于二者共有 深拷贝:会申请一块新的内存进行存储,相当于自己独占 对于dict的copy来说,是对最表层的键值对进行了深拷贝,举例来说: ```python a = {'one': 1, 'two': 2, 'three': [1,2,3] ......
python dict copy

在PyInstaller中打包Python代码

在PyInstaller中打包Python代码 在实际开发中,我们经常需要将Python代码打包成可独立运行的可执行文件,以便更方便地分享和部署。`PyInstaller`是一个常用的Python打包工具,可以将Python脚本打包成单个可执行文件。 ##### 以下是如何使用PyInstaller ......
PyInstaller 代码 Python

Python框架Flask

# 项目配置 ### debug模式 ![](https://img2023.cnblogs.com/blog/3027493/202306/3027493-20230624200009941-702819214.png) ![](https://img2023.cnblogs.com/blog/3 ......
框架 Python Flask

python入门(八):文件操作

# Python文件操作指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image ......
文件 python

python入门(九):异常处理

# Python异常处理指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image ......
python

python入门(五):流程控制语句

# Python控制流语句指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![imag ......
语句 流程 python

python入门(七):函数和模块

# Python函数和模块指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![imag ......
函数 模块 python

python入门(十):面向对象编程

# Python面向对象编程指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![ima ......
对象 python

python入门(六):数据结构和容器

# Python数据结构和容器指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![im ......
数据结构 容器 结构 数据 python

python入门(四):运算符和表达式

# Python运算符和表达式指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![im ......
运算符 表达式 python

python入门(一):python入门大纲

## 什么是Python? - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image] ......
python 大纲

python入门(二):python安装和pycharm安装

## Python的安装 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image]( ......
python pycharm

python入门(三):变量和数据类型

# 变量和数据类型指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image](h ......
变量 类型 数据 python

python学习日志,五大容器的比较

# 列表的使用: 1. 列表.append(元素):向列表中追加一个元素 2. 列表.extend(容器): 将数据容器的内容依次取出,追加到列表尾部 3. 列表.insert(下标,元素):在指定下标处,插入指定的元素 4. del列表[下标]:删除列表指定下标元素 5. 列表.pop(下标):删 ......
容器 python 日志

Python random模块

## Python random模块 ### random模块 > 用于生成随机数 ```python import random print(random.random()) print(random.randint(1, 100)) print(random.randrange(1,100)) ......
模块 Python random

python实现文件批量压缩

## python实现文件夹下文件的批量压缩 ### 初级版本 压缩之前 ![image-20230624173118646](https://img2023.cnblogs.com/blog/2637088/202306/2637088-20230624175641855-81910240.png ......
文件 python

Python configparser模块

## Python configparser模块 > 用于生成和修改常见配置文档,当前模块的名称在 python 3.x 版本中变更为 configparser。 - 常见文档格式如下 ``` [DEFAULT] ServerAliveInterval = 45 Compression = yes ......
configparser 模块 Python

0.组织Python代码的技巧

# 组织Python代码技巧 [英文版链接](https://guicommits.com/organize-python-code-like-a-pro/) ## 一.构建Python项目 首先关注目录结构、文件命名和模块组织。 我 建议把所有的模块都放在src目录下,所有测试都和它并排。 pyt ......
代码 技巧 Python

Python json和pickle模块

## json和pickle模块 > - 用于序列化的两个模块 ### 序列化模块:json 和 pickle ``` json,用于字符串 和 python数据类型间进行转换 pickle,用于python特有的类型 和 python的数据类型间进行转换 Json模块提供了四个功能:dumps、d ......
模块 Python pickle json

Python潮流周刊#8:Python 3.13 计划将解释器提速 50%!

你好,我是猫哥。这里每周分享优质的 Python 及通用技术内容,部分为英文,已在小标题注明。(标题取自其中一则分享,不代表全部内容都是该主题,特此声明。) 首发于我的博客:[https://pythoncat.top/posts/2023-06-24-weekly](https://pythonc ......
解释器 Python 周刊 潮流 3.13

【python基础】文件-初识文件

文本文件可存储的数据量是非常多的。每当需要分析或修改存储在文件中的信息时,首先就是读取文件到内存中,为此可以一次性读取文件的全部内容,也可以以每次一行的方式逐步读取。 # 1.读取文件 ## 1.1读取整个文件 要读取文件,需要一个包含几行文本的文件。下面首先来创建一个poems文本文件,,里面存储 ......
文件 基础 python

Python subprocess模块

## Python subprocess模块 ### subprocess模块 可以执行shell命令的相关模块和函数有: ```python os.system os.spawn* os.popen* --废弃 popen2.* --废弃 commands.* --废弃,3.x中被移除 ``` 以 ......
subprocess 模块 Python

Python shutil模块

## Python shutil模块 > 高级的 文件、文件夹、压缩包 处理模块 ### 将文件内容拷贝到另一个文件中,可以部分内容 ```python shutil.copyfileobj(fsrc, fdst[, length]) ``` - 例子 ```python import shutil ......
模块 Python shutil

Python hashlib模块

## Python hashlib模块 ### hashlib模块 * 用于加密相关的操作,代替了md5模块和sha模块 * 主要提供 SHA1, SHA224, SHA256, SHA384, SHA512 ,MD5 算法 ```python # md5废弃 import md5 hash = m ......
模块 hashlib Python

Python os模块

## Python os模块 ### os模块 > 用于提供系统级别的操作 ```python os.getcwd() # 获取当前工作目录,即当前python脚本工作的目录路径 os.chdir("dirname") # 改变当前脚本工作目录;相当于shell下cd os.curdir # 返回当 ......
模块 Python

Python sys模块

## Python sys模块 ### sys模块 > 用于提供对解释器相关的操作 ```python sys.argv # 命令行参数List,第一个元素是程序本身路径 sys.exit(n) # 退出程序,正常退出时exit(0) sys.version # 获取Python解释程序的版本信息 ......
模块 Python sys

Python 模块(转载)

## Python 常用模块 ### 模块分类 * 自定义模块 * 开源模块 * 内置模块 ### 自定义模块 #### 定义模块 情景一 ![](https://images2015.cnblogs.com/blog/425762/201511/425762-20151120210254796-3 ......
模块 Python

在 Python 中,类型属于对象,变量是没有类型的

在 Python 中,类型属于对象,变量是没有类型的: ━━━━━━━━━━━━━━━━━━━━━━━━━ ``` a=[1,2,3] a="w3cschool" ``` 以上代码中,[1,2,3] 是 list 类型,"w3cschool"是 string 类型,而变量 a 是没有类型,她仅仅是一 ......
类型 变量 对象 Python

使用python发送sip协议的OPTIONS

环境:Windows10_x64 Python版本 :3.9.2 sip协议提供了OPTIONS请求方法可用于探测对端状态,今天记录下Windows10环境下使用python3.9简单实现sip协议的options功能(udp承载)的过程,并提供示例代码及相关资源下载,可从如下渠道获取: 关注微信公 ......
OPTIONS python sip

python: Treeview Control binding data using tkinter and ttkbootstrap GUI

""" StudentUI.py 读文件类 date 2023-06-24 edit: Geovin Du,geovindu, 涂聚文 ide: PyCharm 2023.1 python 11 """ import datetime import sys import os from tkinte ......