Skip to content
  • About Me

charlie笔记

A programmer’s note boke for work and life

月份:2016年6月

打印当前python文件错误行

20 6月01 1月 by test31297505

在python错误调试过程中有时需要打印当前python文件错误行,下面来介绍一下方法: import sys […]

Continue reading
Posted in 未分类 · Leave a comment

python对象类型判断与函数重载

20 6月01 1月 by test31297505

1. 判断对象类型 通过type函数可以知道对象的类型,示例代码如下: x = ‘hello&#8 […]

Continue reading
Posted in 未分类 · Leave a comment

python教程python日期函数实例

20 6月01 1月 by test31297505

在python中对日期进行操作的库有:datetime、time 无论在哪种语言,日期函数肯定是最常用的函数。 […]

Continue reading
Posted in 未分类 · Leave a comment

查看python的可用模块

20 6月01 1月 by test31297505

1.这种方式的问题是,只列出当前import进上下文的模块. 进入python命令行.输入以下代码: $ py […]

Continue reading
Posted in 未分类 · Leave a comment

python开发

20 6月01 1月 by test31297505

总结我们在平常开发过程中对字符串的一些操作: #字母大小写转换 #首字母转大写 #去除字符串中特殊字符(如:& […]

Continue reading
Posted in 未分类 · Leave a comment

python同时给多个变量赋值

20 6月01 1月 by test31297505

同时赋多个值 以下是一种很酷的编程捷径:在 python 中,可使用元组来一次 赋多值。 >>> v = (& […]

Continue reading
Posted in 未分类 · Leave a comment

python开发的range()函数

20 6月01 1月 by test31297505

python中的range()函数的功能hen强大,所以我觉得很有必要和大家分享一下 就好像其api中所描述的 […]

Continue reading
Posted in 未分类 · Leave a comment

python线程池进一步认识

20 6月01 1月 by test31297505

线程池的概念是什么? 在面向对象编程中,创建和销毁对象是很费时间的,因为创建一个对象要获取内存资源或者其它更多 […]

Continue reading
Posted in 未分类 · Leave a comment

pythonlogging模块研究

20 6月01 1月 by test31297505

背景 在一个新的项目里面加入了日志功能,想自己写一个,但是一个偶然的机会,通过google发现python内建 […]

Continue reading
Posted in 未分类 · Leave a comment

你所不知道的python循环中的else

20 6月01 1月 by test31297505

众多语言中都有if else这对条件选择组合,但是在python中还有更多else使用的地方,比如说循环for […]

Continue reading
Posted in 未分类 · Leave a comment

python中的class

20 6月01 1月 by test31297505

尽管python在function programming中有着其他语言难以企及的的优势,但是我们也不要忘了p […]

Continue reading
Posted in 未分类 · Leave a comment

python全局变量与局部变量详解

20 6月01 1月 by test31297505

python全局变量与局部变量详解 #python中的变量:全局变量和局部变量 #在很多语言中,在声明全局变量 […]

Continue reading
Posted in 未分类 · Leave a comment

python

20 6月01 1月 by test31297505

最近在备份手机上的照片的时候,纯手工操作觉得有些麻烦,就想写个脚本自动进行。因为备份的时候有些照片以前备份过了 […]

Continue reading
Posted in 未分类 · Leave a comment

python的类实例属性访问规则

20 6月01 1月 by test31297505

一般来说,在python中,类实例属性的访问规则算是比较直观的。 但是,仍然存在一些不是很直观的地方,特别是对 […]

Continue reading
Posted in 未分类 · Leave a comment

pythongui开发工具选择

20 6月01 1月 by test31297505

python最大的特点就在于她的快速开发功能。作为一种胶水型语言,python几乎可以渗透在我们编程过程中的各 […]

Continue reading
Posted in 未分类 · Leave a comment

pythonencode和decode的妙用

20 6月01 1月 by test31297505

>>> “hello”.encode(“hex”) &#821 […]

Continue reading
Posted in 未分类 · Leave a comment

python实用技巧总结

20 6月01 1月 by test31297505

以下是我近些年收集的一些python实用技巧和工具,希望能对你有所帮助。 交换变量 x = 6 y = 5 x […]

Continue reading
Posted in 未分类 · Leave a comment

pythonyield使用浅析

20 6月01 1月 by test31297505

初学 python 的开发者经常会发现很多 python 函数中用到了 yield 关键字,然而,带有 yie […]

Continue reading
Posted in 未分类 · Leave a comment

python之装饰器详解

20 6月01 1月 by test31297505

装饰器的语法以@开头,接着是装饰器函数的名字、可选参数。 紧跟装饰器声明的是被装饰的函数和被装饰的函数的可选参 […]

Continue reading
Posted in 未分类 · Leave a comment

利用python的socketserver框架编写网络服务程序

20 6月01 1月 by test31297505

1.前言: 虽说用python编写简单的网络程序很方便,但复杂一点的网络程序还是用现成的框架比较好。这样就可以 […]

Continue reading
Posted in 未分类 · Leave a comment

python中文乱码问题大总结

20 6月01 1月 by test31297505

在运行这样类似的代码: #!/usr/bin/env python s=”中文” pr […]

Continue reading
Posted in 未分类 · Leave a comment

python列表类型的所有方法

20 6月01 1月 by test31297505

列表类型有很多方法,这里是列表类型的所有方法: list.append(x) 把一个元素添加到列表的结尾,相当 […]

Continue reading
Posted in 未分类 · Leave a comment

python数据类型转换

20 6月01 1月 by test31297505

python类型转换 函数 描述 int(x [,base ]) 将x转换为一个整数 long(x [,bas […]

Continue reading
Posted in 未分类 · Leave a comment

python的字符串索引和分片

20 6月01 1月 by test31297505

1.字符串的索引 给出一个字符串,可输出任意一个字符,如果索引为负数,就是相当于从后向前数。 >>> str= […]

Continue reading
Posted in 未分类 · Leave a comment

pythonnone与null的区别

20 6月01 1月 by test31297505

一、python对象 要理解这个,首先要理解python对象: python对象具有三个特性:身份、类型、值。 […]

Continue reading
Posted in 未分类 · Leave a comment

python2和python3的10大区别

20 6月01 1月 by test31297505

1.性能 py3.0运行pystone benchmark的速度比py2.5慢30%。guido认为py3.0 […]

Continue reading
Posted in 未分类 · Leave a comment

pythonxml读取和写入

20 6月01 1月 by test31297505

先说说如何创建一个xml文件吧 # -*- coding: utf-8 -*- from xml.dom im […]

Continue reading
Posted in 未分类 · Leave a comment

python算法快速排序

20 6月01 1月 by test31297505

python 算法 快速排序 # -*- coding: utf-8 -*- from random impo […]

Continue reading
Posted in 未分类 · Leave a comment

python全局变量

20 6月01 1月 by test31297505

全局变量不符合参数传递的精神,所以,平时我很少使用,除非定义常量。今天有同事问一个关于全局变量的问题,才发现其 […]

Continue reading
Posted in 未分类 · Leave a comment

python图自身遍历及弱引用使用

20 6月01 1月 by test31297505

在【python 标准库】中看到的一段代码,非常有帮助: def all_nodes(self): yield […]

Continue reading
Posted in 未分类 · Leave a comment

文章导航

先前文章
较新文章

近期文章

  • 15款互联网人必备的AI工具,效率提升2倍
  • 多个ChatGPT通用指令
  • Python采集biaozhun政府文件
  • TensorFlow库:Python中的深度学习
  • python 本地密码管理应用

近期评论

  • helenadmin发表在《Python采集biaozhun政府文件》
  • helenadmin发表在《写给程序员的一封公开信》
  • Google发表在《About Me》
  • helenadmin发表在《ES(ElasticSearch)分布式全文搜索引擎及使用方式》
  • buy viagra发表在《About Me》

文章归档

  • 2024年12月
  • 2024年9月
  • 2024年6月
  • 2024年5月
  • 2024年3月
  • 2024年2月
  • 2024年1月
  • 2023年12月
  • 2023年11月
  • 2023年10月
  • 2023年9月
  • 2023年8月
  • 2023年7月
  • 2023年6月
  • 2023年5月
  • 2023年4月
  • 2023年3月
  • 2023年2月
  • 2023年1月
  • 2022年12月
  • 2022年8月
  • 2022年7月
  • 2022年6月
  • 2022年5月
  • 2022年4月
  • 2022年3月
  • 2022年2月
  • 2022年1月
  • 2021年12月
  • 2021年11月
  • 2021年10月
  • 2021年9月
  • 2021年8月
  • 2021年7月
  • 2021年6月
  • 2021年5月
  • 2021年4月
  • 2021年3月
  • 2021年1月
  • 2020年12月
  • 2020年11月
  • 2020年10月
  • 2020年9月
  • 2020年8月
  • 2020年7月
  • 2020年6月
  • 2020年5月
  • 2020年4月
  • 2020年3月
  • 2020年2月
  • 2020年1月
  • 2019年12月
  • 2019年11月
  • 2019年10月
  • 2019年9月
  • 2019年8月
  • 2019年7月
  • 2019年6月
  • 2019年5月
  • 2019年4月
  • 2019年3月
  • 2019年2月
  • 2019年1月
  • 2018年12月
  • 2018年11月
  • 2018年10月
  • 2018年9月
  • 2018年7月
  • 2018年6月
  • 2018年3月
  • 2018年2月
  • 2018年1月
  • 2017年12月
  • 2017年11月
  • 2017年10月
  • 2017年9月
  • 2017年8月
  • 2017年7月
  • 2017年6月
  • 2017年5月
  • 2017年4月
  • 2017年3月
  • 2017年1月
  • 2016年12月
  • 2016年11月
  • 2016年10月
  • 2016年9月
  • 2016年8月
  • 2016年7月
  • 2016年6月
  • 2016年5月
  • 2016年4月
  • 2016年3月
  • 2016年2月
  • 2015年8月
  • 2015年7月
  • 2015年6月
  • 2015年5月
  • 2014年7月
  • 2014年6月
  • 2014年5月
  • 1970年1月

分类目录

  • Database
  • focus—-实时热搜
  • IC设计
  • js&jquery
  • PHP
  • Python
  • 新技术研习
  • 服务器相关技术
  • 算法
  • 缓存技术
  • 随笔

功能

  • 注册
  • 登录
  • 文章RSS
  • 评论RSS
  • WordPress.org
© 2025 charlie笔记 ·