
PYTHON
iteye_19643
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python基础教程之第1章 基础知识
[code="python"] #1.1 安装Python #1.1.1 Windows #1.1.2 Linux和UNIX #1.1.3 Macintosh #1.1.4 其他发布版 #1.1.5 时常关注,保持更新 #1.2 交互式解释器 D:\>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 ...原创 2014-05-22 05:45:06 · 297 阅读 · 0 评论 -
Python3.x 中,chr() 和 ord() 默认支持unicode
In Python 2.x D:\Python27>python >>> chr(65) 'A' >>> ord('A') 65 >>> unichr(20013) u'\u4e2d' >>> ord(u'\u4e2d') 20013 >>> o原创 2014-09-14 15:44:32 · 989 阅读 · 0 评论 -
如何让python的print函数不自动换行
使用Python语言的print函数时,输出的每一行都会自动换行,如: # coding: UTF-8 for i in range(5): print(i) ''' D:\CODE\PYTHON\OPEN_JUDGE>python tt.py 0 1 2 3 4 ''' 但是有时候不想让它自动换行,需要的是 1 2 3 4 的方式,对此,python 2.x...原创 2014-09-14 15:12:44 · 1541 阅读 · 0 评论 -
Python Bible - Ch23 多线程编程
''' 在Python中,可以通过继承threading.Thread类来创建线程。通过继承threading模块中Thread类来 创建新类,在新类中重写run方法,然后就可以通过start方法启动线程。线程启动后将 运行run方法。以下代码是使用threading模块创建线程。 ''' # coding:utf-8 # Python Bible - e23_1_1.py im...原创 2014-09-10 06:08:52 · 92 阅读 · 0 评论 -
Python基础教程之第9章 魔法方法, 属性和迭代器
[code="python"] #魔法方法, 属性 和 迭代器 D:\>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information....原创 2014-06-09 06:11:02 · 189 阅读 · 0 评论 -
Python基础教程之第8章 异常
[code="python"] #Chapter 8 异常 Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. #8.1 什么是异常 ...原创 2014-06-03 06:06:01 · 163 阅读 · 0 评论 -
Python基础教程之第7章 更加抽象
[code="python"] D:\>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. # Chapter 07 更加...原创 2014-06-02 18:43:49 · 285 阅读 · 0 评论 -
Python基础教程之第6章 抽象
[code="python"] Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. #6.1 懒惰即美德 >>> fibs = [0,1] >...原创 2014-05-29 19:27:26 · 307 阅读 · 0 评论 -
Python基础教程之第5章 条件, 循环和其他语句
[code="python"] Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 #Chapter 5 条件, 循环和其他语句 #5.1 print和import的更多信息 #对于很多应用程序来说, 使用logging模块记日志比print语句更合适 #5.1.1 使用逗号...原创 2014-05-29 09:57:52 · 296 阅读 · 0 评论 -
Python基础教程之第4章 字典: 当索引不好用时
[code="python"] Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. #4.1字典的使用 >>> names=['Alice','Be...原创 2014-05-28 15:07:44 · 331 阅读 · 0 评论 -
Python基础教程之第3章 使用字符串
[code="python"] Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. #3.1基本字符串操作 >>> website = 'http:...原创 2014-05-25 12:08:24 · 141 阅读 · 0 评论 -
Python基础教程之第2章 列表和元组
[code="python"] D:\>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. #2.1序列概览 >>原创 2014-05-25 10:06:27 · 200 阅读 · 0 评论 -
一键执行脚本即可把用户名和密码更新到指定路径下相应的配置文件(支持迭代)...
1) 数据库和相关应用的用户名, 密码等敏感信息加密之后集中存放在某一文件 2) Production Service 只需一键执行脚本即可把用户名和密码更新到指定路径下相应的配置文件(支持迭代). #!/usr/bin/env python import os import sys import re # To read from credential file and...原创 2014-12-14 21:46:27 · 240 阅读 · 0 评论