Python

Python is a general purpose, high level programming language that very commonly is embedded in large applications to automate some tasks by creating scripts or macros.

In FreeCAD, Python code can be used to create various elements programmatically, without needing the graphical user interface. Additionally, many tools and workbenches of FreeCAD are programmed in Python.

When writing Python code, it's advisable to follow PEP8: Style Guide for Python Code.

Conventions
In this wiki, some conventions for Python examples should be followed.

This is a typical function


 * Python indicates optional arguments by providing a default value with key-value pairs. This means that any of the following calls are valid


 * The arguments

import FreeCAD, Draft

In particular, parentheses should immediately follow the function name, and a space should follow a comma. This makes the code more readable.