Python Forum

Full Version: Highlighting in IDLE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm new to Python and have just started using it but I have seen in tutorials where certain lines and key words within the code are highlighted with different colors, while is orange, comments are red and so on. I went into the options settings and it was already set for IDLE Classic, but I reselected it and tried a couple of other settings but my code still has no colors.

I saw a few other threads on highlighting but they don't seem to be for this problem.

Any suggestions?

Thanks
John
The simple answer is: just don't use IDLE. For the most part, it doesn't matter what text editor you use (Visual Studio Code comes builtin with python syntax highlighting, though), and idle is unintuitive in a lot of ways.
I knew I could use any editor but I like the highlighting feature plus this is all new to me so I don't really know what my options are.

I did find the problem though. Even though I opened IDLE to create my program and saved my file it was not saved as a Python (.py) file. I opened another session of IDLE copied my file into that, saved it and made sure it had the .py extension, now it highlights.

Thanks for your help and info
John
(Feb-06-2018, 09:12 PM)Stumpy_L Wrote: [ -> ]I don't really know what my options are
try some of these
https://wiki.python.org/moin/PythonEditors
Wow that's quite a list, I have some homework to do.

Which do you use?

Thanks
John
An IDE is a personal thing, like a car. You have to try and use the one you like the best,
That being said, I like PyCharm Highlighting Themes, code completion, code inspection,
jupyter notebook editing built in, much more
i like Vim and sometimes Geany.
ptpython with cmder,which look good on Windows and is a lot better that build in IDLE.
Example all string method show up automatic,with doc-string help.
[Image: mxL7WY.jpg]
Same for Linux ptpython,but there with fish shell.
Main editor for all OS is VS Code,my quick review.
So much to learn, but that's part of the fun.

Thanks all
John
I used to just use notepad++, but Visual Studio Code has grown into my favorite editor: https://code.visualstudio.com