Write some of the big kills that Python uses.

Source: Internet
Author: User

Http://iyuan.iteye.com/blog/855933Python, is only a list of some of their own use, feel very reliable third-party modules.

PEP8 http://pypi.python.org/pypi/pep8/0.6.1
This is a static check code format, especially for the new people from other languages, it is very useful.

Pygenie http://www.traceback.org/2008/03/31/measuring-cyclomatic-complexity-of-python-code/
This is the test Python code loop complex, with the unittest, easy to control coverage, the most important, simplify the code!

Nose http://somethingaboutorange.com/mrl/projects/nose/0.11.3/
Functionality is similar to Python's built-in UnitTest, adding a lot of extensions that are theoretically easier to manipulate

Pyflakes http://pypi.python.org/packages/source/p/pyflakes/pyflakes-0.4.0.tar.gz#md5=630a72510aae8758f48cf60e4fa17176
Used to verify the use of the module, will list those introduced but not used modules, similar functions and pylint, relatively more detailed, of course, if not idle pep8 wordy words, is no problem, pyflakes more lightweight just

Temporarily so much, think or use it again, if there is new, will update this article.

Another, Python comes with some things also very good, such as profile (but feel a bit heavy), Timeit is sweet stuff ~


-------2013/04/18 Update:
PDB Python comes with debugging tools, if you are tired of debugging when you look at a certain value to go to the source code to add a sentence print, you may want to try the PDB, seamless debugging easier:
PYTHON-M PDB yourcode.py
Enter debug mode, you can enter H to view Help, get a series of available commands, the specific use of commands can also be
H yourcmd to query, simply list some common commands:
> Breakpoint Settings
(Pdb) B #断点设置在本py的第10行
or (Pdb) b ots.py:20 #断点设置到 ots.py line 20th
Delete Breakpoint (Pdb) b #查看断点编号
(PDB) CL 2 #删除第2个断点

> Operation
(PDB) n #单步运行
(PDB) s #细点运行 that's going down, method
(PDB) C #跳到下个断点
> View
(Pdb) p param #查看当前 Variable value
(PDB) L #查看运行到某处代码
(PDB) A #查看全部栈内变量
> Launch PDB mode
(PDB) Q

Write some of the big killing device Python uses

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.