Skip to content

Conversation

@gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Nov 16, 2025

I'm working on using pyrepl for pdb (at least most of it). I like the real-time color rendering for user's code, but we need some modification for pdb. The user could type a pdb command or a piece of valid python code. The problem now is we have some pdb commands that are either keywords or builtins (continue, break, list). We probably want to make all pdb commands the same color.

In order to do that, we can create a customized gen_colors function for pdb - use the original gen_colors mostly, but with some extra checks on the first word.

However, there's no way to hook that into pyrepl now. I think this change should be trivial enough without breaking the existing code or making the code base too messy. We already have plenty of code that changes the Reader object at run-time so that won't be an exception either.

@gaogaotiantian
Copy link
Member Author

@ambv could you take a look when you have some time? I believe you implemented the original feature for real-time color in REPL.

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.

1 participant