2

I'm using QGIS 2.18 on both Windows and OSX. I have created a startup.py script in my user directory within the .qgis2/python directory. QGIS is reading the startup script correctly because it will execute print statements and other simple tests.

I'm trying to automatically launch the Python Console when QGIS starts using the following code:

from console import console
console.show_console()

I don't get any errors. Nothing happens. I can however trigger exceptions with intentionally incorrect Python code.

I know QGIS will keep the console if it was open at shutdown, but I want to guarantee it's available at startup.

Launching the console at startup is fairly well documented around the Net but doesn't seem to be working in QGIS 2.18. Am I doing something wrong or can somebody verify similar behavior in this version?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.