Skip to content
  • About Me

charlie笔记

A programmer’s note boke for work and life

月份:2016年9月

新学python,编写helloword.py提示无效语法。?

25 9月01 1月 by test16134286

具体如图。python版本是2.7.6,文本编辑是gedit,试过可行的多种缩进均invalid syntax […]

Continue reading
Posted in 未分类 · Leave a comment

python2.5/2.6实用教程入门基础篇

25 9月01 1月 by test30307667

起步走 代码如下: #! /usr/bin/python a=2 b=3 c=”test&#822 […]

Continue reading
Posted in 未分类 · Leave a comment

跟老齐学python之从if开始语句的征程

25 9月01 1月 by test16134286

一般编程的教材,都是要把所有的变量类型讲完,然后才讲语句。这种讲法,其实不符合学习的特点。学习,就是要循序渐进 […]

Continue reading
Posted in 未分类 · Leave a comment

python素数检测实例分析

25 9月01 1月 by test30307667

本文实例讲述了python素数检测的方法。分享给大家供大家参考。具体如下: 该程序实现了素数检测器功能,如果结 […]

Continue reading
Posted in 未分类 · Leave a comment

python文件操作整理汇总

25 9月01 1月 by test30307667

总是记不住api。昨晚写的时候用到了这些,但是没记住,于是就索性整理一下吧: python中对文件、文件夹(文 […]

Continue reading
Posted in 未分类 · Leave a comment

python连接mongodb操作数据示例(mongodb数据库配置类)

25 9月01 1月 by test16134286

一、相关代码数据库配置类 mongodbconn.py 代码如下: #encoding=utf-8&#8221 […]

Continue reading
Posted in 未分类 · Leave a comment

python命令行参数解析模块optparse使用实例

25 9月01 1月 by test30307667

示例 代码如下: from optparse import optionparser […] de […]

Continue reading
Posted in 未分类 · Leave a comment

python正则匹配抓取豆瓣电影链接和评论代码分享

24 9月01 1月 by test16134286

代码如下: import urllib.requestimport reimport time def mov […]

Continue reading
Posted in 未分类 · Leave a comment

python实现网站的模拟登录

24 9月01 1月 by test4807991

本文主要用python实现了对网站的模拟登录。通过自己构造post数据来用python实现登录过程。 当你要模 […]

Continue reading
Posted in 未分类 · Leave a comment

pyramid添加middleware的方法实例

24 9月01 1月 by test30307667

假设我们要添加一个我们自己的middleware,用来记录每次请求的日志下面就是一个符合规范的middlewa […]

Continue reading
Posted in 未分类 · Leave a comment

python转码问题的解决方法

24 9月01 1月 by test30307667

比如,若要将某个string对象s从gbk内码转换为utf-8,可以如下操作 s.decode(‘ […]

Continue reading
Posted in 未分类 · Leave a comment

在python中使用模块的教程

24 9月01 1月 by test30307667

python本身就内置了很多非常有用的模块,只要安装完毕,这些模块就可以立刻使用。 我们以内建的sys模块为例 […]

Continue reading
Posted in 未分类 · Leave a comment

安装python的web.py框架并从helloworld开始编程

24 9月01 1月 by test30307667

最近有一个小的web项目,想用喜爱都python,但是想到之前接触过都django我感觉一阵不寒而栗,为什么& […]

Continue reading
Posted in 未分类 · Leave a comment

python正则表达式re模块使用说明

24 9月01 1月 by test30307667

首先,运行 python 解释器,导入 re 模块并编译一个 re: #!python python 2.2. […]

Continue reading
Posted in 未分类 · Leave a comment

windows8下安装python的beautifulsoup

24 9月01 1月 by test30307667

运行环境:windows 8.1 python:2.7.6 在安装的时候,我使用的pip来进行安装,命令如下: […]

Continue reading
Posted in 未分类 · Leave a comment

python中操作符重载用法分析

23 9月01 1月 by test16134286

本文实例讲述了python中操作符重载用法。分享给大家供大家参考,具体如下: 类可以重载python的操作符 […]

Continue reading
Posted in 未分类 · Leave a comment

python实现统计英文单词个数及字符串分割代码

23 9月01 1月 by test30307667

字符串分割 代码如下: str=”a|and|hello|||ab” alist = […]

Continue reading
Posted in 未分类 · Leave a comment

python数据结构之图的实现方法

23 9月01 1月 by test4807991

本文实例讲述了python数据结构之图的实现方法。分享给大家供大家参考。具体如下: 下面简要的介绍下: 比如有 […]

Continue reading
Posted in 未分类 · Leave a comment

详解详解python中writelines()方法的使用

23 9月01 1月 by test30307667

writelines()方法写入字符串序列到文件。该序列可以是任何可迭代的对象产生字符串,字符串为一般列表。没 […]

Continue reading
Posted in 未分类 · Leave a comment

几个提升python运行效率的方法之间的对比

23 9月01 1月 by test30307667

在我看来,python社区分为了三个流派,分别是python 2.x组织,3.x组织和pypy组织。这个分类基 […]

Continue reading
Posted in 未分类 · Leave a comment

python里隐藏的“禅”

23 9月01 1月 by test16134286

在 python的lib目录里有一个:this.py,它其实是隐藏着一首诗,源码如下: 代码如下: s = & […]

Continue reading
Posted in 未分类 · Leave a comment

学习python的几条建议分享

23 9月01 1月 by test30307667

熟悉python语言,以及学会python的编码方式。熟悉python库,遇到开发任务的时候知道如何去找对应的 […]

Continue reading
Posted in 未分类 · Leave a comment

python参数列表中的self显式不等于冗余

22 9月01 1月 by test30307667

self在区分全局变量/函数和对象中的成员变量/函数十分有用。例如,它提供了一种作用域机制,我个人认为比rub […]

Continue reading
Posted in 未分类 · Leave a comment

python回溯法实现数组全排列输出实例分析

22 9月01 1月 by test30307667

本文实例讲述了python回溯法实现数组全排列输出的方法。分享给大家供大家参考。具体分析如下: 全排列解释:从 […]

Continue reading
Posted in 未分类 · Leave a comment

用python计算三角函数之atan()方法的使用

22 9月01 1月 by test4807991

atan()方法返回x的反正切值,以弧度表示。 syntax 以下是atan()方法的语法: atan(x) […]

Continue reading
Posted in 未分类 · Leave a comment

python解析xml文件

22 9月01 1月 by test30307667

python文件: 代码如下: #parsexml.py #本例子参考自python联机文档,做了适当改动和添 […]

Continue reading
Posted in 未分类 · Leave a comment

python基于queue和threading实现多线程下载实例

22 9月01 1月 by test30307667

本文实例讲述了python基于queue和threading实现多线程下载的方法,分享给大家供大家参考。具体方 […]

Continue reading
Posted in 未分类 · Leave a comment

使用python脚本操作mongodb的教程

22 9月01 1月 by test30307667

连接数据库 mongoclient vs connection class mongoclient(pymon […]

Continue reading
Posted in 未分类 · Leave a comment

python实现探测socket和web服务示例

21 9月01 1月 by test16134286

操作系统:linux软件环境:python 2.7.3 用法: 代码如下: $ ./monsocket.py […]

Continue reading
Posted in 未分类 · Leave a comment

python中实现对timestamp和datetime及utc时间之间的转换

21 9月01 1月 by test30307667

python项目中很多时候会需要将时间在datetime格式和timestamp格式之间转化,又或者你需要将u […]

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笔记 ·