python programming
文章平均质量分 56
furaoingqq
这个作者很懒,什么都没留下…
展开
-
Threads in Python
http://www.python-course.eu/threads.phpThreads in PythonDefinition of a ThreadA Thread or a Thread of Execution is defined in computer science as the smallest unit that can be scheduled转载 2015-01-07 20:51:03 · 449 阅读 · 0 评论 -
Python - VS Complier
Windows: python 2.7 ---- VS2008 Complier python 3.4 ---- VS2010 ComplierPython 2.7 会搜索 Visual Studio 2008. 如果你电脑上没有这个版本的话,比如只有: 1.Visual Studio 2010,在cmd里面执行:SET VS90COMNTOOLS=%VS1原创 2015-06-16 00:30:42 · 489 阅读 · 0 评论 -
Python Package Management
1. Install WheelsUse pip to install wheel files using the full path:C:\Python34\Scripts\pip install C:\Python34\Scripts\pygame-1.9.2a0-cp34-none-win_amd64.whlWithout the path the name is转载 2015-06-04 19:53:25 · 377 阅读 · 0 评论 -
Python Function Definition and Funcion Call Discussion
0. The parameter defined in a function can be regarded as a local variable that can be only effectively referenced within the function's local scope. When a funciton call happens, the parameters of th原创 2015-06-07 21:35:14 · 322 阅读 · 0 评论 -
Regular Expression Discussion
1. Pattern .*? will match all the text appended by for only once and return result:Example: pattern = r'[0-9].*?'text = r'9800abcd'match = re.findall(pattern, text)Result:matchO原创 2015-06-08 12:08:21 · 437 阅读 · 0 评论 -
Python 2.7 Data Type for Text Strings: Unicode and Str
The problem of encoding errors when writing programs in python 2.7 is the co-existence of Unicode type string and Str type string. The "default" data type for text strings in python2.7 is Str type,原创 2015-06-11 12:59:11 · 300 阅读 · 0 评论 -
Scrapy Spider Project Technical Notes
1. Xpath IssueThe xpath selector in Scrapy implements a different xpath rule regards "text()" selector with respect to the default lxml library.In Scrapy, the text() selector will return all the t原创 2015-06-01 09:50:11 · 588 阅读 · 0 评论 -
Python Path Discussion
There are various ways to get the path of a module or package in python, such as through the module attritube __file__, __name__. Other ways including os.path.realpath(), or sys.argv[0], etc; However,原创 2015-06-06 22:05:54 · 394 阅读 · 0 评论 -
SimplyBrand Project Notes
1. Python 2.7The write method of file object can only accetp py2.7 str type object as the argument, unicode type object is not accepted !原创 2015-10-16 14:29:45 · 324 阅读 · 0 评论 -
Python Technical Notes
1. Single Underscore / Double Underscore Included in a Identifier:An identifier with a leading single underscore is weakly private.An identifier with a leading double underscore is name mangling.原创 2015-07-23 13:03:46 · 600 阅读 · 0 评论 -
python读取excel
python操作Excel读写--使用xlrd一、安装xlrd模块 到python官网下载http://pypi.python.org/pypi/xlrd模块安装,前提是已经安装了python 环境。二、使用介绍 1、导入模块 import xlrd 2、打开Excel文件读取数据 data = xlr转载 2015-04-21 15:15:45 · 635 阅读 · 0 评论 -
python 写入excel
XlsxWriter是基于Python的,用来操作Excel的库。100%支持xlsx文件的写入操作。示例代码:?12345678910111213141516171819202122转载 2015-04-21 15:14:22 · 526 阅读 · 0 评论 -
Python Syntax Note
1. Global Statement: Programing languages commanly allow functions to read and change global variables. However, the python programming language allows functions to read, but not chage the global原创 2015-01-05 23:29:33 · 285 阅读 · 0 评论 -
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Cha
Ever wonder about that mysterious Content-Type tag? You know, the one you're supposed to put in HTML and you never quite know what it should be?Did you ever get an email from your friends in Bulgari转载 2014-12-21 15:04:25 · 725 阅读 · 0 评论 -
Python___List Comprehension and Generator Function
List Comprehension:List_Obj=[1,2,3,4]Gneerator Function:List_Obj=list()原创 2014-12-07 14:28:08 · 316 阅读 · 0 评论 -
Json概述以及python对json的相关操作
JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。易于人阅读和编写。同时也易于机器解析和生成。它基于JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999的一个子集。JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族的习惯(包括C, C+转载 2014-12-10 20:30:18 · 292 阅读 · 0 评论 -
pythonxy 安装
为了和numpy, scipy等社区的推荐的标准导入方式一致,请点击按钮Startup script,然后在打开的文件夹中添加一个名为numpy.py的文件,编辑此文件,添加以下几行推荐的导入import numpy as npimport scipy as spimport pylab as pl此后运行IPython(x,y)的时候请记着要选择numpy.py为启动脚本。如果转载 2014-12-10 14:12:44 · 1891 阅读 · 0 评论 -
Scipy, Import pylab
PyLabCurrently this page reflects the vision of KeirMierle, and not necessarily the community as a whole. By integrating consensus from mailing list discussions, I will refine and polish this vi转载 2015-01-05 18:05:06 · 667 阅读 · 0 评论 -
How to implement switch statement in python
Replacements for switch statement in Python?up vote430down votefavorite182I want to write a function in Python that returns different fixed values based o转载 2015-03-19 22:31:48 · 810 阅读 · 0 评论 -
How do you read from stdin in Python?
How do you read from stdin in Python?up vote555down votefavorite145I'm trying to do some of the code golf challenges, but they all require the input to转载 2015-03-19 22:26:56 · 1066 阅读 · 0 评论 -
Python Variable
There is no such thing as "variable declaration" or "variable initialization" in Python.There is simply what we call "assignment", but should probably just call "naming".Assignment means "this转载 2015-03-06 09:59:05 · 706 阅读 · 0 评论 -
Python Concurrent Programming
1. Python2.7 supports the basic co-routine (generators) via the yield keyword, but a generator cannot take any arguments after it is defined.原创 2016-01-01 19:29:46 · 485 阅读 · 0 评论