Skip to content

Commit a369ed0

Browse files
committed
Import iface into Python console
1 parent 8927a3d commit a369ed0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

python/console/console_output.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ def __init__(self, parent=None):
125125
def insertInitText(self):
126126
txtInit = QCoreApplication.translate("PythonConsole",
127127
"## To access Quantum GIS environment from this console\n"
128-
"## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.\n\n")
128+
"## iface object (instance of QgisInterface class). \n"
129+
"## Type help(iface) for more info and list of methods.\n\n")
129130
initText = self.setText(txtInit)
130131

131132
def refreshLexerProperties(self):

python/console/console_sci.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
import os
3131
import code
3232

33-
_init_commands = ["from qgis.core import *", "import qgis.utils"]
33+
_init_commands = ["from qgis.core import *", "import qgis.utils",
34+
"from qgis.utils import iface"]
3435
_historyFile = os.path.join(str(QDir.homePath()),".qgis","console_history.txt")
3536

3637
class PythonEdit(QsciScintilla, code.InteractiveInterpreter):

0 commit comments

Comments
 (0)