Skip to content

qml: add python console - #11004

Draft
f321x wants to merge 3 commits into
spesmilo:masterfrom
f321x:qml_console
Draft

f321x wants to merge 3 commits into
spesmilo:masterfrom
f321x:qml_console

Conversation

@f321x

@f321x f321x commented Sep 28, 2026

Copy link
Copy Markdown
Member

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

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.
@f321x f321x added the gui-qml label Sep 28, 2026

@SomberNight SomberNight Sep 28, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console "tab" for Android app

2 participants