What is python’s site-packages directory?

site-packages is the target directory of manually built Python packages. When you build and install Python packages from source (using distutils, probably by executing python setup.py install), you will find the installed modules in site-packages by default. There are standard locations: Unix (pure)1: prefix/lib/pythonX.Y/site-packages Unix (non-pure): exec-prefix/lib/pythonX.Y/site-packages Windows: prefix\Lib\site-packages 1 Pure means that the module uses only Python code. Non-pure can contain C/C++ code as well. site-packages is by default … Read more

Syntax highlighting in vim for python

The command to enable syntax highlighting in vim is :syntax on, if you want it to be active everytime you launch vim, just add a line containing syntax on in your .vimrc file.

TypeError: got multiple values for argument

This happens when a keyword argument is specified that overwrites a positional argument. For example, let’s imagine a function that draws a colored box. The function selects the color to be used and delegates the drawing of the box to another function, relaying all extra arguments. Then the call will fail because two values are … Read more