Forums

Syntax highlighting in Python console

I apologize if there is a post on this--I have searched and have not been able to find this precise question. I want to use standard syntax highlighting in a Python console online; I am going to teach a course which includes students doing some entry-level work with pre-existing code. When I run the Python console in PythonAnywhere, I only manage to get the black screen with all white text. Since these are not computer science students, it would help them with parsing different parts of the commands if they could see the colors.

Here is a link to a screenshot of what I would do in IDLE. (I want to move to the online environment to balance things for students without personal laptops.)

https://docs.google.com/document/d/1BRFZA6iq86kO5ZMd5BUhh3NWizbFKn-2b9Zaq0jfg4I/edit?usp=sharing

I would prefer not to use the file editor on PythonAnywhere if I can, due to the class structure. If there's no way to use syntax highlighting directly in the Python Console, I may just deal with the solid black-and-white.

Thanks!

If you use a more recent version of IPython in a virtualenv, then it gives you syntax highlighting as you type.