
python
u014717398
生活要好好过,代码还是要一行行的写,思考学习不能停。
展开
-
python环境搭建(pycharm)
学习自:http://blog.youkuaiyun.com/chentravelling/article/details/49875125(之后某段学习的我会贴网址并且尽量用我自己的理解来说)1、安装pythonhttps://www.python.org/downloads/release/python-2713/我用的这个网址目前是2-7-13 版本 我的是32bit win7(转载 2017-02-27 19:10:06 · 3748 阅读 · 0 评论 -
win7下 scrapy的安装
学习自: http://scrapy-chs.readthedocs.io/zh_CN/0.24/intro/install.html我的python已经是预先安装好的2.7版本的原文中 pywin32的网址是:从 http://sourceforge.net/projects/pywin32/ 安装 pywin32我的2.7 32位是这个网址https://source转载 2017-03-14 10:12:51 · 959 阅读 · 0 评论 -
python的小实验代码的备份,主要偏向于爬虫方向,难点是正则表达式和编码转换[入门]
#coding=utf-8a = 10b = 20print ab or a==bprint ab and a==bprint not True##################################################################################################print str.__doc__#####原创 2017-03-19 19:44:47 · 499 阅读 · 0 评论 -
python中try except处理程序异常的三种常用方法
转载自:http://www.pythontab.com/html/2013/pythonjichu_0204/210.html如果你在写python程序时遇到异常后想进行如下处理的话,一般用try来处理异常,假设有下面的一段程序:12345678try:转载 2017-03-18 12:39:15 · 50123 阅读 · 2 评论 -
python基础学习笔记(十三) 正则表达式 转载
python基础学习笔记(十三)学习自:http://www.cnblogs.com/fnng/archive/2013/05/20/3089816.htmlre模块包含对 正则表达式。本章会对re模块主要特征和正则表达式进行介绍。 什么是正则表达式正则表达式是可以匹配文本片段的模式。最简单的正则表达式就是普通字符串,可以匹配其自身。换包话说,正转载 2017-03-17 20:25:27 · 397 阅读 · 0 评论 -
学习python[n] 保存的网址
http://cuiqingcai.com/912.htmlhttp://www.cnblogs.com/xin-xin/p/4297852.htmlhttp://www.cnblogs.com/shiyanlou/p/6022974.htmlhttp://www.pythontab.com/html/2013/pythonhexinbianchen转载 2017-03-02 23:55:02 · 368 阅读 · 0 评论 -
学习python[4] python os.path.sep
装载自: http://blog.chinaunix.net/uid-25890465-id-3338463.htmlpython中os.path常用模块os.path.sep:路径分隔符 linux下就用这个了’/’os.path.altsep: 根目录os.path.curdir:当前目录os.path.pardir:父目录转载 2017-03-02 15:25:52 · 4577 阅读 · 0 评论 -
学习python[3] python 读取中文文件名/中文路径
转载自:http://blog.youkuaiyun.com/yukin_xue/article/details/9769803Python直接读取中文路径的文件时失败,可做如下处理:dst3 = "D:/test/测试文件夹.txt"uipath = unicode(dst3 , "utf8")然后用"uipath"经过编码后的路径去open()或者:转载 2017-03-02 01:24:56 · 12588 阅读 · 0 评论 -
学习python[2] Python:文件操作技巧(File operation)
转载自: http://www.codeweblog.com/python-%E6%96%87%E4%BB%B6%E6%93%8D%E4%BD%9C%E6%8A%80%E5%B7%A7-file-operation/读写文件# ! /usr/bin/python# -*- coding: utf8 -*- spath = " D:/download/baa.tx转载 2017-03-01 23:57:54 · 548 阅读 · 0 评论 -
学习python[1] Python入门教程 超详细1小时学会Python
转载自:http://www.jb51.net/article/926.htmPython入门教程 超详细1小时学会Python为什么使用Python 假设我们有这么一项任务:简单测试局域网中的电脑是否连通.这些电脑的ip范围从192.168.0.101到192.168.0.200. 思路:用shell编程.(Linux通常是b转载 2017-03-01 23:16:02 · 613 阅读 · 0 评论 -
python获取文件修改时间与创建时间
转载自: http://blog.youkuaiyun.com/liyuan_669/article/details/25347037import osimport time y = time.ctie(os.stat("D:\\test\\1.txt").st_mtime)yfilemt= time.localtime(os.stat(filename).st_转载 2017-05-22 15:53:55 · 17699 阅读 · 0 评论