上一页 1 2 3 4 5 6 ··· 20 下一页
摘要: 一、基本语法 1.标题 建议在#后面加一个空格 2.列表 注意:符号和文字之间加上一个字符的空格 3.引用 4.链接 5.图片 6.粗体与斜体 7.代码框 8.分隔符 二、参考文章 http://www.jianshu.com/p/1e402922ee32/ 阅读全文
posted @ 2016-06-19 18:48 Kimisme 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 第一步:安装node.js 官方网址:https://nodejs.org/en/ 运行以下命令,确认是否安装成功 node -v 第二步:安装gitbook npm install -g gitbook-cli 运行以下命令,确认是否安装成功 gitbook -V 第三步:初始化一个gitbook目录 gitbook init 发现该文件夹下多... 阅读全文
posted @ 2016-06-19 11:44 Kimisme 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1.第一步 下载py文件:https://bootstrap.pypa.io/ez_setup.py #!/usr/bin/env python """ Setuptools bootstrapping installer. Maintained at https://github.com/pypa/setuptools/tree/bootstrap. Run thi... 阅读全文
posted @ 2016-06-13 13:42 Kimisme 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 1.引入其他模块 from printme import sayHi sayHi() 或者 import printme printme.sayHi() 当一个模块被第一次输入的时候,这个模块的主块将被运行。 如果我们只想程序本身被使用的时候运行主块,而在它被其他模块输入的时候不运行主块 编写primtme.py def sayHi(): pass... 阅读全文
posted @ 2016-06-12 14:51 Kimisme 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Py2exe 64位下载地址:http://download.csdn.net/detail/henujyj/8532827 Py2exe 32位下载地址:https://sourceforge.net/projects/py2exe/files/ 以下程序执行的结果是将hello.py程序打包成hello.exe可执行文件 第一步,编写hellp.py: #-*_coding... 阅读全文
posted @ 2016-06-11 15:34 Kimisme 阅读(492) 评论(0) 推荐(0) 编辑
摘要: 第三方Pthon包查找:http://www.lfd.uci.edu/ http://www.cnblogs.com/lanxuezaipiao/p/3543658.html 阅读全文
posted @ 2016-06-11 15:07 Kimisme 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 下载MySQLdb:http://www.codegood.com/downloads 1.简单查询 #!/usr/bin/python # -*- coding: UTF-8 -*- import MySQLdb #打开数据库连接 con = MySQLdb.connect('localhost', 'root', '123456','test') #使用cursor()方法获取操... 阅读全文
posted @ 2016-06-11 13:33 Kimisme 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 1.常用符号 . 匹配任意字符 * 匹配前一个字符0次或无限次 ? 匹配前一个字符0次或1次 .* 贪心算法 .*? 非贪心算法 ()... 阅读全文
posted @ 2016-06-09 21:06 Kimisme 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 1.创建一个类 class Employee: empCount = 0 def __init__(self,name,salary): self.name = name self.salary = salary Employee.empCount +=1 def displayEmployee(self): ... 阅读全文
posted @ 2016-06-09 17:33 Kimisme 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 1.try…except…else try: fn = open("aa.txt","r") fn.write("这是一个测试文件") except Exception as e: print "错误提示",e.message else: print "写入内容成功" fn.close() 2.try…finally try: ... 阅读全文
posted @ 2016-06-09 15:42 Kimisme 阅读(199) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 20 下一页