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
Yoann Quenach de Quivillic
139ee639c2
Add named constants to designate interpreter states
2023-04-24 10:57:12 +10:00
Yoann Quenach de Quivillic
29016d052e
Fix spelling and add license
2023-04-24 10:57:12 +10:00
Yoann Quenach de Quivillic
ea89babbf3
Handle multiple inputs
2023-04-24 10:57:12 +10:00
Yoann Quenach de Quivillic
6257a659b1
Add IPython-style assignment
2023-04-24 10:57:12 +10:00
Yoann Quenach de Quivillic
73e9596064
Run system commands with !
2023-04-24 10:57:12 +10:00
Yoann Quenach de Quivillic
d798fd0732
Use embedded messageBar in showMessage
2023-04-18 14:55:32 +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
6612506d7b
Remove outdated code
2023-03-30 12:40:06 +10:00
Nyall Dawson
1822998bda
[feature][console] Allow Python console to be toggled between a dock
...
widget and a full main window dialog
Adds the same toggle button as we use for 3d map canvases and attribute
tables to make it super-easy to switch the Python console to a full
main window.
2023-03-30 12:40:06 +10:00
Nyall Dawson
03e1d90b39
Immediately write out the console history file BEFORE running commands
...
This prevents loss of history when a user enters a Python command
which results in a QGIS crash
2023-03-28 15:04:39 +10:00
Nyall Dawson
b9b06b057a
Don't add 'exec(Path(...))' entries to console history when running scripts
...
These just clutter the history
2023-03-28 15:04:39 +10:00
Denis Rouzaud
4e10546b4b
follow-up refctoring settings for code editor
2023-03-21 09:44:19 +10:00
Nyall Dawson
56ce8ca673
Add reset buttons to numeric controls
2023-03-20 16:06:24 +10:00
Nyall Dawson
a6b4742e97
Use settings registry for new settings
2023-03-20 16:06:24 +10:00
Nyall Dawson
1c2aead582
Remove duplicate code
2023-03-20 16:06:24 +10:00
Matthias Kuhn
e5d6ade348
Merge pull request #51912 from YoannQDQ/python-console-__file__-available--#49191
2023-03-18 14:56:20 +01:00
Yoann Quenach de Quivillic
4c74bd99c8
Populate combo box in code rather than in ui
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
d2d7c5b422
Use native levenshtein distance
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
5040a3b263
Fix flake8
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
8db1026ed2
Use pushWarning instead of pushMessage
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
53c7b8011b
Fallback to difflib if levenshtein unavailable
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
04a8436187
Conditional import
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
311c1b14d2
Fix infinite loop
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
00d279e999
Fix merge error
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
364bb96850
Change wording format->reformat
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
6523f0c58c
Keep cursor position after formatting
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
0f84e095b7
Add isort (sort imports)
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
63a48983d9
Add black formatter
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
3c97906bbf
Add formatting options
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
ef6de1ff2c
Add format code action in Python Console Editor
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
1f25b41d79
Fix duplicated newline on save (windows)
2023-03-13 14:49:32 +10:00
Yoann Quenach de Quivillic
a1a43e5362
Fixes #49191 make "__file__" available to scripts
2023-03-03 15:57:24 +01:00
Yoann Quenach de Quivillic
43c415d109
Fix focus switch on close tab
2023-03-03 12:17:01 +10:00
Yoann Quenach de Quivillic
fc3847def7
Fix bug introduced by #51913 - Proxy EditorTab attributes to Editor
2023-03-03 12:17:01 +10:00
Yoann Quenach de Quivillic
9c56921cca
Clean up code and fix shortcuts
2023-02-21 14:27:36 +10:00
Yoann Quenach de Quivillic
28146b538a
Fix Editor/EditorTab never deleted
2023-02-21 14:27:36 +10:00
Yoann Quenach de Quivillic
7f231099f4
sort imports and cleanup dead code
2023-02-21 14:27:36 +10:00
Yoann Quenach de Quivillic
e6f2fc1288
Add autoSurround setting
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
451317b783
Set autoCloseBracket default value to True
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
e992797f8b
Restore autoCloseBracket settings and factorize autoInsertImport
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
f98266b768
Get rid of the old autoCloseBracket setting
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
1c79b4927d
[feature][console] Add toggle comment action in the python console ( #50341 )
...
Adds a toggle comment action in the Python Console and script editors
2023-01-07 09:27:08 +10:00
Nyall Dawson
941adaa4a8
Some more code to base class
2022-10-24 16:46:11 +10:00
Nyall Dawson
955c72388d
Factor out interpreter
2022-10-24 16:46:11 +10:00
Nyall Dawson
73b75af8c3
Move prompt handling to QgsCodeEditor
2022-10-24 16:46:11 +10:00
Nyall Dawson
374dcbab53
Minor cleanups
2022-10-24 16:46:11 +10:00