Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Import iface into Python console
  • Loading branch information
NathanW2 committed Jan 12, 2013
1 parent 8927a3d commit a369ed0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/console/console_output.py
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion python/console/console_sci.py
Expand Up @@ -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):
Expand Down

0 comments on commit a369ed0

Please sign in to comment.