PDA Knowledge Collection

24 Feb 2014

Listed below are some documentation and references I collected over the course of developing tool pda:

Python packing tools differences:

Uninstall a python package you installed with python setup.py install? See this stackoverflow thread

Python static code analyzing tool:

Python Standard Coding Style:

Updating your distribution

Down the road, after you’ve made updates to your distribution and wish to make a new release:


distributing a command line python application example:


twine error:

(py27_venv)> twine upload ../dist/*
KeyError: Missing 'None' section from the configuration file


how to make gnu make ignore/continue after errors? http://stackoverflow.com/questions/2188376/how-to-have-gnu-make-continue-after-error

To leave a python virtualenv:


The long_description field can be attached to a text file located in the package:

from distutils.core import setup

with open('README.txt') as file:
    long_description = file.read()


In that case, README.txt is a regular reStructuredText text file located in the root of the package besides setup.py.

Please install pip install docutils to have a front-end tool rst2html.py tool installed before using it.

To prevent registering broken reStructuredText content, you can use the rst2html program that is provided by the docutils package and check the long_description from the command line:

$ python setup.py --long-description | rst2html.py > output.html

docutils will display a warning if there’s something wrong with your syntax. Because PyPI applies additional checks (e.g. by passing –no-raw to rst2html.py in the command above), being able to run the command above without warnings does not guarantee that PyPI will convert the content successfully.

Sphinx reST syntax for various code blocks: http://sphinx-doc.org/markup/code.html

Further about generate documentation with Sphinx and reST:

(Even Varnish project uses it!) https://www.varnish-cache.org/docs/trunk/phk/sphinx.html

python 3 resourcewarning problem python 2 to 3 porting cheatsheet