Book Image

Mastering QGIS

Book Image

Mastering QGIS

Overview of this book

Table of Contents (18 chapters)
Mastering QGIS
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The Python Console


The Python Console is a wonderful instrument to explore and learn PyQGIS. It's available in every QGIS installation and can be opened by selecting the Python Console voice in the Plugins menu.

The Python Console is a dockable interface, and like all dockable interfaces, you can change its position inside QGIS or separate it. You can try moving the console by dragging and dropping it.

The console is shown in this screenshot:

As you can see, the console is composed of a button toolbar marked by the red box. The bigger Python Console is marked by the upper-right red box and is where all the command results are shown, and finally a bottom command line, marked by the bottom-right red box, is where you can edit commands.

Here, we describe how to test code interactively and explore the PyQGIS classes. However, we will not explain all the possibilities of the Python Console. These are well documented and you can find them at http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook...