Jump to content

Python

From Wikimedia Belgium

Python is a modern and practical programming language, with decent error handling.

Debugging

[edit]

Pywikibot scripts can be difficult to debug. Python debugging (pdb) can be a powerful tool, but seems not to be very good documented.

Arbitrary expressions can be typed, and the result is show.

Type: help (h) to get more information.

To activate the Python debugger, the following commands are sufficient:

import pdb
pdb.set_trace()

After debugging, you can continue (c) the execution of the program.

[edit]