This presentation will enlighten the novice Python QGIS user with different ways of running Python code in QGIS without the need of building a QGIS Python plugin. Any QGIS user could start writing small Python scripts for automating, customizing and extending QGIS, making their daily workflow an easier and more fun task to complete.-Python through the QGIS Python Console and Script editor: This would be the most obvious place for PyQGIS newcomers. The console and editor comes with syntax highlighting, autocomplete and easy integration to QGIS.-Scriptrunner: A handy plugin for running Python scripts when objects needs to be instantiated.-Extending the Expression engine: Using a startup.py in your .qgis2 Python folder with a @qgsfunction(0, "Python") attribute. An example is shown adding the name of the current user, to a label on a Print Composer composition.-Run script on project event open, close and save: You may want to validate if a certain table is open, and notify the user if it is not, when opening or saving a QGIS project.-Python in QGIS Actions: Extend your QGIS actions with Python code. -Python Init function: A powerful feature in QGIS when creating new features. You can validate and programmatically edit your attribute input. One can also process the newly digitalized geometry. An example is shown creating rectangular oil tanks with predefined dimension.-Processing Framework: Scripting methods from the Processing Framework. Useful when you need to loop or run a batch of commands from the Processing Framework. |