Skip to content
Permalink
Browse files
Import iface into Python console
  • Loading branch information
NathanW2 committed Jan 12, 2013
1 parent 8927a3d commit a369ed0f5cf180e25661d88bda59cc6e34f17920
Showing with 4 additions and 2 deletions.
  1. +2 −1 python/console/console_output.py
  2. +2 −1 python/console/console_sci.py
@@ -125,7 +125,8 @@ def __init__(self, parent=None):
def insertInitText(self):
txtInit = QCoreApplication.translate("PythonConsole",
"## To access Quantum GIS environment from this console\n"
"## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.\n\n")
"## iface object (instance of QgisInterface class). \n"
"## Type help(iface) for more info and list of methods.\n\n")
initText = self.setText(txtInit)

def refreshLexerProperties(self):
@@ -30,7 +30,8 @@
import os
import code

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

class PythonEdit(QsciScintilla, code.InteractiveInterpreter):

0 comments on commit a369ed0

Please sign in to comment.