Skip to content

interpreters/python: use NuttX readline for TTY input - #3746

Open
raiden00pl wants to merge 2 commits into
apache:masterfrom
raiden00pl:intel64-display-console-pr3
Open

interpreters/python: use NuttX readline for TTY input #3746
raiden00pl wants to merge 2 commits into
apache:masterfrom
raiden00pl:intel64-display-console-pr3

Conversation

@raiden00pl

Copy link
Copy Markdown
Member

Summary

  • system/readline: add caller-selectable control handling
  • interpreters/python: use NuttX readline for TTY input

Impact

Gives CPython opt-in Ctrl-D EOF and signal handling (Ctrl-C)

Testing

python on intel64

image

cederom
cederom previously approved these changes Aug 22, 2026

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @raiden00pl :-) CI complains about mixed case in underlying Python source code :-)

@cederom
cederom requested review from acassis and linguini1 August 22, 2026 08:14
Comment thread system/readline/readline_fd.c Outdated
fputs(prompt, stderr);
}

fflush(stderr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not output to sys_stdout

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let CPython handle Ctrl-D and signals without changing existing NSH behavior.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
CPython's default TTY reader bypasses NuttX editing and control-key handling.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants