qml: add python console - #11004
Draft
f321x wants to merge 3 commits into
Draft
qml: add python console#11004f321x wants to merge 3 commits into
f321x wants to merge 3 commits into
Conversation
Ports the toolkit-independent REPL logic from the Qt GUI console (eval/exec with SyntaxError fallback, stdout capture, multiline constructs, history, completions, traceback filtering) into a QML backend object.
Touch-friendly python console: read-only scrollback, single-line input with on-screen history/tab-complete/run buttons, completion candidates as tappable chips.
SomberNight
reviewed
Sep 28, 2026
Member
There was a problem hiding this comment.
note: the Console should only be accessible if:
- the password is unified, and
- the user already proved knowledge of the password (e.g. by opening a wallet)
Otherwise the user can create a new wallet file with a new password, open the console, and e.g. try programmatically bruteforcing the password of the other wallet files.
EDIT: actually that's still too weak a criteria: e.g. the console can be used to disable config.GUI_QML_PAYMENT_AUTHENTICATION, making that config setting pointless.
Hence I would add the following requirement:
- enabling the Console is not persisted: it has to be re-enabled on every unix-process-lifecycle. So if you fully quit the app, the Console gets disabled. And to enable it, we probably want
@auth_protect(method='wallet')
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a python console to the QML GUI (similar to the desktop one).
WIP but opening this PR so the branch doesn't get lost (using this for some months now).
Useful for debugging on-the-go and a fun party trick for upcoming conferences.
Also generally seems low-maintenance to have it around (desktop console doesn't really require any attention).
Screencast_20260928_172644.webm
Closes #5375