- dsosby / config-highlight.cfg
- How to Get dark theme in Python IDLE[3.8]
- Dark Theme in Python IDLE – Version 2.7
- What is Python IDLE?
- Why you should add dark theme to your Python IDLE?
- Pros:
- Python IDLE Dark Theme Code [Monokai Theme]:
- Steps to Add Dark Theme to Your Python IDLE:
- Conclusion:
- Python: лайфхаки по настройке среды программирования
- 1. Изменение системных переменных среды
- 2. Открывать выбранный файл при открытии программы среды программирования Python IDLE
- 3. Ночной режим в окне среды программирования Python IDLE
dsosby / config-highlight.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
[Obsidian] |
definition-foreground = # 678CB1 |
error-foreground = # FF0000 |
string-background = # 293134 |
keyword-foreground = # 93C763 |
normal-foreground = # E0E2E4 |
comment-background = # 293134 |
hit-foreground = # E0E2E4 |
builtin-background = # 293134 |
stdout-foreground = # 678CB1 |
cursor-foreground = # E0E2E4 |
break-background = # 293134 |
comment-foreground = # 66747B |
hilite-background = # 2F393C |
hilite-foreground = # E0E2E4 |
definition-background = # 293134 |
stderr-background = # 293134 |
hit-background = # 000000 |
console-foreground = # E0E2E4 |
normal-background = # 293134 |
builtin-foreground = # E0E2E4 |
stdout-background = # 293134 |
console-background = # 293134 |
stderr-foreground = # FB0000 |
keyword-background = # 293134 |
string-foreground = # EC7600 |
break-foreground = # E0E2E4 |
error-background = # 293134 |
In my pc, configure file is in(Python 3.5.1 x64 in Windows 7) :
C:\Users.idlerc
Very nice. Any idea how to let decorators like @classmethod have a different color?
I don’t see the .idlerc file. 🙁
Is there anyway to change the font?
Very nice theme. Thanks a lot.
On windows 10, using Pythin 3.4, I had to update «C:\Python34\Lib\idlelib\config-highlight.def» file.
Ty for the theme and help with Windows 10. Using Python 3.5. This theme has lasted some years!
Thanks I’ve forked because I like the colours but prefer a perfectly black background instead of the greyish one in this theme.
Ever since installing Idle3 I can not use the «options / configure» menu item — the program freezes and a bunch of errors on the command line. Don’t know what to do — everything else works, Idle3 a great editor for Python3.5 [Linux Fedora 24 64bit]. But I guess I just gotta stay with the default white look . (
Thank you! Continues to be useful. Am on Windows 10, but used duphenix’s method (Sep 28, 2012 comment). Saved one of the existing themes as a custom theme, so the config-highlight.cfg was auto-created, then pasted the Obsidian data in it.
On Windows 10, the .idlerc folder was in my user folder.
Eye-saving theme, thank you!
As above, on Windows 10 my config-highlight.def file was found at C:\WinPython\python-3.6.1.amd64\Lib\idlelib and I was able to paste the Obsidian theme in there.
Thankyou this is amazing! (x2)
Brilliant, just what I was looking for, thankyou
beautiful them , Thanks a lot.
I couldn’t save «config-highlight.def» file after editing it in the «\Python34\Lib\idlelib» folder, So i had to move the file «config-highlight.def» to «C:\Users\User.idlerc» folder, then i edited it and saved the file in «C:\Users\User.idlerc» folder, after that i returned the file in «\Python34\Lib\idlelib» folder, I’ve struggled so much but finally it worked.
As listed above, For Python 3.6.4 x64 in Windows 10:
C:\Users\AppData\Local\Programs\Python\Python36\Lib\idlelib\config-highlight.def, then add the code to the end of the file.
Ensure IDLE is closed first, then edit the file and save then close. Then open IDLE and navigate to Options > Configure IDLE > and select the «Hightlighting Theme» button underneath a Built-in Theme (unless you are already using ‘a Custom Theme); by default it will read, «IDLE Classic» so click it and select «Obsidian» from the drop-down menu. If you want it to fit in nicely, you can open the config-highlight.def file and change [Obsidian] to [OBSIDAN].
Thanks to everyone in the comments above that made this doable using the latest software on the latest build of Windows 10 and for the OP for such an awesome schema I didn’t have to manually customize myself.
[IDLE Obsidian]definition-foreground = #678CB1
error-foreground = #FF0000
string-background = #293134
keyword-foreground = #93C763
normal-foreground = #E0E2E4
comment-background = #293134
hit-foreground = #E0E2E4
builtin-background = #293134
stdout-foreground = #678CB1
cursor-foreground = #E0E2E4
break-background = #293134
comment-foreground = #66747B
hilite-background = #2F393C
hilite-foreground = #E0E2E4
definition-background = #293134
stderr-background = #293134
hit-background = #000000
console-foreground = #E0E2E4
normal-background = #293134
builtin-foreground = #E0E2E4
stdout-background = #293134
console-background = #293134
stderr-foreground = #FB0000
keyword-background = #293134
string-foreground = #EC7600
break-foreground = #E0E2E4
error-background = #293134
How to Get dark theme in Python IDLE[3.8]
Dark Theme in Python IDLE – Version 2.7
Python is a high- level, general-purpose, interactive, interpreted and object-oriented programming language. It was developed in 1991. As Python allows the programmer to write programs and instruction using fewer lines of codes, it has caught the attention of Millions of Developers.
If you are a Python Developer and especially a night-owl programmer, this hack is for you which will transform your Python IDLE 3.8 in Dark Theme which will reduce your eye strain in low light conditions. If you want to feel Monokai Theme of Sublime Text, then go ahead and add the Dark theme to your Python IDLE 3.8 and save your eyes.
What is Python IDLE?
Python IDLE which stands for “Integrated Development and Learning Environment” is an integrated development environment (IDE) for Python Programming Language and is by default installed with the Python installer for Windows.
You can open Python IDLE from the Start menu in the Windows Operating System by searching for ‘IDLE’.
In the case of Python distributions for Linux and macOS, Python IDLE is not available by default.
For Ubuntu Linux, You can install the Python IDLE with the help of the following command:
Python IDLE is used for executing single line python statements. Developers basically use Python IDLE to develop, modify, execute and debug Python scripts. Python IDLE provides a fully-featured and efficient text editor to write Python scripts. It also includes some awesome features like syntax highlighting, autocompletion and smart indent. Developers love IDLE as it provides the debugger with stepping and breakpoints features.
You can download Python from it’s an official site which automatically comes with Python IDLE.
Why you should add dark theme to your Python IDLE?
The programmers are the main source of income for eye doctors 🙁
The dark themes are getting more and popular nowadays for night-owl programmers. Some people just like the vibe, while others use dark themes simply to reduce eye strain and save battery.
Pros:
- Dark themes can reduce eye strain in low-light conditions, more specifically at night time.
- High contrast between foreground and background reduces eye strain.
- Syntax highlighting on Python IDLE can be easier to read with dark themes like monokai.
Adopt Dark Theme and Happy Coding while protecting your most precious organ – ‘Eye’!
Python IDLE Dark Theme Code [Monokai Theme]:
Below is the code for adding Dark Theme in Python IDLE which you will require in the next section describing steps for adding a dark theme to your python IDLE.
The Monokai Theme code changes the syntax highlighting and various text editor component’s colors including foreground and background.
normal-foreground= #F8F8F2
normal-background= #272822
keyword-foreground= #F92672
keyword-background= #272822
builtin-foreground= #66D9EF
builtin-background= #272822
comment-foreground= #75715E
comment-background= #272822
string-foreground= #E6DB74
string-background= #272822
definition-foreground= #A6E22E
definition-background= #272822
hilite-foreground= #F8F8F2
hilite-background= gray
break-foreground= black
break-background= #ffff55
hit-foreground= #F8F8F2
hit-background= #171812
error-foreground= #ff3338
error-background= #272822
cursor-foreground= #F8F8F2
stdout-foreground= #DDDDDD
stdout-background= #272822
stderr-foreground= #ff3338
stderr-background= #272822
console-foreground= #75715E
console-background= #272822
Steps to Add Dark Theme to Your Python IDLE:
1). Open Python Folder from the path you selected during installing Python. In this case it is ( C:\Python38-32 )
2). In Python38-32 Folder, search for Lib and double click on it.
3). In the Lib folder, search for idlelib folder and double click on it.
4). In idlelib folder, search for CONFIG-HIGHLIGHT.DEF file and open it with any text editor tool like Notepad.
5). In the CONFIG-HIGHLIGHT.DEF file, paste the Monokai Code given in the above section. Save and close the file.
6). Now Restart your system, Open Python IDLE, From the menu bar select Options -> Configure IDLE -> Highlighting & You will see the monokai theme in Highlighting themes section. Select Monokai theme and Enjoy 🙂
7). Do share this Post if your love your new Python IDLE Look
Link to Video Tutorial “How to Get dark theme in Python IDLE[3.8]”: https://www.youtube.com/watch?v=4pTRBH5Pa9g
Conclusion:
Finally concluding this article subjected, How to Get dark theme in Python IDLE and execute python scripts like a pro without spoiling your eyes.
We have included the topics; What is Python IDLE?, How to install Python IDLE on your System?, Why you need to add a dark theme to your python IDLE? and Steps to add a dark theme to your python IDLE.
I hope this piece helped you and satisfies the reason for you being here, and if you have any queries or questions related to this thread, then please make a comment below and let me help you with that concern.
Happy Coding and protect your Eyes!
Python: лайфхаки по настройке среды программирования
Как только вы установили на компьютер Python, лучше сразу позаботиться о небольших нюансах, которые облегают жизнь программистам. Давайте пройдемся по основным настройкам среды программирования и Windows для комфортной работы:
1. Изменение системных переменных среды
Эта настройка позволит запускать программу, написанную на Python, в CMD операционной системы Windows (интерпретатор командной строки). Чтобы это сделать, нажимаем «Пуск» -> Изменение системных переменных среды:
В разделе «Дополнительно» нажимаем снизу «Переменные среды»:
Выбираем переменную «Path» и нажимаем «Изменить»:
Здесь нужно вписать дополнительное значение переменной Path. Все, что было написано так и оставляем, и через точно с запятой приписываем путь к папке, в которой установлен Python. В моем случае это C:\Python31
Таким образом, если мы захотим запустить программу через интерпретатор Windows, то находим cmd.exe и все должно работать:
2. Открывать выбранный файл при открытии программы среды программирования Python IDLE
По умолчанию при открытии Python IDLE запускается новое окно среды программирования. Свою программу мы обычно пишем в файле с разрешением .py — например, в моем случае это Kot.py
Правой кнопкой мыши нажимаем на иконку Python IDLE, и выбираем «Свойства»:
В разделе «Ярлык» нужно дописать после имеющегося текста в кавычках путь к файлу, который нужно открыть при запуске программы:
Этот способ также подходит для любой программы. К примеру, если вы хотите при открытии Photoshop или Word запускать конкретный файл, то процедура назначения файла аналогичная.
3. Ночной режим в окне среды программирования Python IDLE
Чтобы глаза меньше уставали при работе, можно выбрать «темную» тему. Для этого заходим в Python IDLE, сверху нажимаем Options -> Configure IDLE
Заходим в раздел Highlights и выбираем одну из встроенных тем подсветки кода (Highlighting theme -> a Built-in Theme). Темная тема называется IDLE Dark: