Parallel Multiprocessing with Python
Python multiprocessing One of my biggest complaints with Python is the GIL. The Global Interpreter Lock prevents using multiple threads to execute CPU bound tasks. However, using the multiprocessing module, a Python script can side step the GIL by running other, separate instances of the Python interpreter. Each instance, having its own GIL, can run the same function in parallel with different input. The operating system can then, at the process level, distribute the work among multiple processors and processor cores.
Python and Spaces and Tabs, Oh My!
Python indentation The subject of Python source code indentation can be a contentious one. The Python style guide (PEP8) suggests that using four spaces per indentation level is the proper was to indent Python code. However, I have discovered I prefer to use tabs instead of spaces. Could I customize my text editor of choice, Vim, to edit using tabs and save to disk using spaces? Doing so would allow me to adhere to PEP8 when exchanging source code files with other programmers.