Nyall Dawson
fcfe98c8ed
Some super-safety in overridden stdout/stderr to ensure we don't
...
try to write to a deleted qwidget
2023-06-14 07:48:13 +10:00
Nyall Dawson
def4acc14a
Gracefully restore the system stdout/stderr when the python console
...
is about to be destroyed
2023-06-14 07:48:13 +10:00
Yoann Quenach de Quivillic
ab98551fec
Apply suggestions from code review
...
Co-authored-by: Étienne Trimaille <gustrimaille@yahoo.fr>
2023-05-26 09:38:25 +10:00
Yoann Quenach de Quivillic
88c3c41638
Improve console help
2023-05-26 09:38:25 +10:00
Nyall Dawson
895a68faee
Expose 'Search Selection in PyQGIS docs' action for all python code editors
2023-04-06 08:32:41 +10:00
Nyall Dawson
955c72388d
Factor out interpreter
2022-10-24 16:46:11 +10:00
Nyall Dawson
ed54489a09
Move some useful python console methods to base class
2022-10-10 14:01:24 +10:00
Nyall Dawson
0f54df6675
[console] Prepend introductory text with '#' to avoid attempting to format it as Python code
2021-03-31 05:22:12 +10:00
Nyall Dawson
18d8a76009
Fix incorrect capitalization
2021-03-31 05:22:12 +10:00
Nyall Dawson
8d3e028d15
Cleanup raw margin manipulation used to hide holding controls, use proper methods
2020-10-13 14:14:53 +10:00
Nyall Dawson
33f50496d7
Fix bad merge
2020-10-06 03:57:50 +10:00
Nyall Dawson
8ec7f0e69c
Remove QgsPythonConsoleBase so that we have a single definitive Python editor class (QgsCodeEditorPython)
2020-10-06 03:57:50 +10:00
nirvn
f67515c674
[console] Additional tweaks to looks of console input/output area
2020-10-05 17:18:43 +07:00
Nyall Dawson
bc55102eb8
Move icon references back out of QgsPythonConsoleBase
2020-10-05 18:37:46 +10:00
Nyall Dawson
e66a0a025b
Move more code out of QgsPythonConsoleBase
2020-10-05 18:37:46 +10:00
Nyall Dawson
d9782a12f5
Move more code to QgsCodeEditorPython base class
2020-10-05 13:24:46 +10:00
Nyall Dawson
ad946d45c8
Ensure colors in Python console match colors for Python editors
...
used elsewhere in the application
2020-10-04 05:02:57 +10:00
Richard Duivenvoorde
982e4f1262
Rename BaseClass to QgsPythonConsoleBase
2020-09-03 16:03:25 +02:00
Richard Duivenvoorde
354b9598ec
Move font, margin and caret code to baseclass
2020-08-27 18:26:54 +02:00
Richard Duivenvoorde
ab83e57cc8
Context menu 'Search selected in PyQGIS docs' in Console panes
2020-07-08 21:47:08 +02:00
Richard Duivenvoorde
a1fda50f95
Move setLexers to base
2020-07-08 21:17:27 +02:00
Richard Duivenvoorde
180a630363
Move icons to base and add some to items
2020-07-05 11:48:27 +02:00
Richard Duivenvoorde
5889f7df78
Add simple BaseClass
2020-07-04 16:36:47 +02:00
Matthias Kuhn
af670a264e
Improve security warning on console
2020-06-29 07:23:20 +10:00
Nyall Dawson
33fb57e4a0
Also restrict scope of Ctrl+A select all shortcut to avoid ambiguity
2020-06-04 10:59:27 +10:00
Nyall Dawson
873716c6fa
Limit scope of Ctrl+C shortcut for copy features to canvas and for
...
python console to console widget
Avoids ambiguous shortcut warnings/unexpected behavior when pressing
Ctrl+C
Fixes #27035
Fixes #31918
Fixes #31914
Fixes #31392
2020-06-04 10:59:27 +10:00
nirvn
296fc6cf89
[python console] Move the >>> prompt into the margin to fix a gazillion issues
2020-06-03 11:45:13 +07:00
Nyall Dawson
b6a7a10703
Fix some more python formatting issues, remove more flake exceptions
2020-05-11 11:41:50 +10:00
Julien Cabieces
b82ce0e522
fix crash when print from qgis processing algorithm while the python console is displayed
2019-01-29 21:34:45 +11:00
nirvn
2aebeb0157
[ui] add security warning to the python console
2018-08-20 14:41:07 +07:00
Matthias Kuhn
ae192e8624
Make console printing safe
...
References #8343 https://issues.qgis.org/issues/8343
2018-07-02 18:35:24 -05:00
nirvn
45aca2f942
fix unclosed strings not style in python console & script editor
2018-05-23 10:08:02 +07:00
nirvn
9cf6bbf424
Improve default color scheme for python console & script editor
2018-05-22 17:56:25 +07:00
nirvn
45b045d212
Fix missing color settings for python console / script editor
2018-05-22 13:31:29 +07:00
Nyall Dawson
6d87a4cf3f
[console] Fix unclosed strings don't respect the preset font size
2018-05-22 15:43:14 +10:00
Shiva Reddy
536cc9cfbe
Update writeOut to include isatty ( #6602 )
...
Added these lines so that QGIS 3 python console works in window
2018-03-16 08:20:14 +11:00
Felis Pimeja
198bf77208
Vectorize console icons ( #6515 )
2018-03-09 09:53:53 +07:00
Alexander Bruy
7823025b8d
[python console] remove 'u' prefixes from strings ( fix #18171 )
2018-02-23 10:39:08 +02:00
Juergen E. Fischer
6dfedc38e9
translation string fixes and cleanups
2018-02-15 22:31:15 +01:00
Denis Rouzaud
3dc3d9d1b2
unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
...
make enum items lower case
remove unused QgsMessageLog::None and All
2018-02-06 08:56:40 -04:00
Nyall Dawson
f6269c41da
[console] Allow breaking execution of scripts via Ctrl-C
...
This allows (in some circumstances) scripts running in the console
to be halted via the Ctrl (or Meta) + C shortcut.
(It's only possible to catch and abort when the script is printing
outputs to the console - because this triggers
QCoreApplication.processEvents() calls. Without these calls the
whole QGIS application is unresponsive during script execution
and there's no ability to even catch a shortcut in order to
halt the execution.
Still, even with this limitation it's handy to be able to
break out of lengthy:
for f in iface.activeLayer().getFeatures():
print(f.attributes())
loops!)
2018-01-30 09:58:31 +10:00
Nyall Dawson
0f79bfba1c
Use svg version of python console icon, courtesy of @pkinglinz ( #6016 )
2018-01-09 10:33:08 +07:00
Matthias Kuhn
0e09fdacde
Use monospace fonts for console on all platforms
2017-04-12 22:21:59 +02:00
Juergen E. Fischer
ecc5bb508e
pep8/pyflakes3 cleanups
2017-03-04 02:38:15 +01:00
Juergen E. Fischer
a10c890383
More QgsSettings updates:
...
* revives WMS
* QgsSettings::clear() added
* section added to QgsSettings::contains()
* type parameter added to sip binding of QgsSettings.value()
* TODO: customization & evis
2017-03-04 02:37:59 +01:00
Denis Rouzaud
0a63d1f2c2
[spellcheck] properly look into various cases and add more fixes"
2017-01-16 16:39:20 +01:00
Juergen E. Fischer
31df84aa6b
run 2to3 on source
2016-09-21 23:30:04 +02:00
Denis Rouzaud
8071acd064
move PyQt compat folder to python/qgis
2016-04-29 14:10:26 +02:00
Matthias Kuhn
e133b42896
Enable console with Python3 / PyQt5
2016-03-29 08:20:43 +02:00
Juergen E. Fischer
885d0ec993
python console: switch to pyqt wrappers and new style signals, flake8 fixes, show exceptions in console also with pyqt5
2016-03-21 17:00:25 +01:00