mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
[console] Prepend introductory text with '#' to avoid attempting to format it as Python code
This commit is contained in:
parent
18d8a76009
commit
0f54df6675
@ -141,6 +141,8 @@ class ShellOutputScintilla(QgsCodeEditorPython):
|
||||
"Use iface to access QGIS API interface or type help(iface) for more info\n"
|
||||
"Security warning: typing commands from an untrusted source can harm your computer")
|
||||
|
||||
txtInit = '\n'.join(['# ' + line for line in txtInit.split('\n')])
|
||||
|
||||
# some translation string for the console header ends without '\n'
|
||||
# and the first command in console will be appended at the header text.
|
||||
# The following code add a '\n' at the end of the string if not present.
|
||||
|
Loading…
x
Reference in New Issue
Block a user