Skip to content
Browse files

Merge pull request #7087 from slarosa/fix_19001

Fixes #19001: update url for _pyqgis and _api commands
  • Loading branch information
slarosa committed May 29, 2018
2 parents d157b6e + 3edc07b commit 68b7f5a80766ca6aa129cbc105cada09ef48e7f7
Showing with 8 additions and 4 deletions.
  1. +8 −4 python/console/
@@ -31,7 +31,7 @@
import re
import traceback

from qgis.core import QgsApplication, QgsSettings
from qgis.core import QgsApplication, QgsSettings, Qgis
from .ui_console_history_dlg import Ui_HistoryDialogPythonConsole

_init_commands = ["from qgis.core import *", "from qgis.gui import *", "from qgis.analysis import *", "import processing", "import qgis.utils",
@@ -619,11 +619,15 @@ def runCommand(self, cmd):
import webbrowser
if cmd in ('_pyqgis', '_api'):
version = 'master' if 'master' in Qgis.QGIS_VERSION.lower() else re.findall('^\d.[0-9]*', Qgis.QGIS_VERSION)[0]
if cmd in ('_pyqgis', '_api', '_cookbook'):
if cmd == '_pyqgis':"")"{}".format(version))
elif cmd == '_api':"")"{}".format(version))
elif cmd == '_cookbook':"{}/en/docs/pyqgis_developer_cookbook/".format(
'testing' if version == 'master' else version))
more = False

0 comments on commit 68b7f5a

Please sign in to comment.
You can’t perform that action at this time.