Как сделать idle черным
Wing Python IDE
The Intelligent Development Environment for Python
Navigation
Wing Tips: Dark Mode and Color Configuration in Wing Python IDE
Wing Python IDE provides a number of dark color palettes, and the ability to quickly toggle between light and dark mode using the menu icon in the top right of the IDE window. When Dark Mode is selected, Wing switches to the most recently used dark color configuration, or the default dark configuration if none has been used.
Black Background: The classic original dark mode for Wing
Cherry Blossom: New in Wing 7
Dracula: New in Wing 7
One Dark: The default dark color palette
Positronic: New in Wing 7
Sun Steel: New in Wing 7
In most cases you will also want to enable the User Interface > Use Color Palette Throughout the UI preference, so that the color palette is applied to more than just editors. This preference is enabled automatically when the Dark Mode menu item is used for the first time, and is enabled in all of the above screenshots. However, it may be disabled so only the editors are displayed dark. Wing will remember that choice when subsequently changing between light and dark modes.
Color Configuration
Aside from selecting the overall color palette with the User Interface > Color Palette preference, it is also possible to override individual colors throughout the preferences, or to write your own color palette, including colors for the UI and optionally also for syntax highlighting in the editor. This is described in more detail in Display Style and Colors.
That’s it for now! We’ll be back soon with more Wing Tips for Wing Python IDE.
IDLE background color in python
Is there a way to change background color of python-3.5 IDLE under windows 10? I’ve tried google and reading docs, but i can’t find the answer. I’m not sure it’s even possible.
4 Answers 4
For text window backgrounds, go to Options => IDLE Preferences => Highlighting tab. Save the builtin theme (both are the same) as a custom theme, with a new name. Change the background of each element with a white background to the color you want. Hit Apply or OK. Alternatively, copy the following into /.idlerc/config-highlight.cfg (which may or may not exist already) and change #ffffff to your desired color.
We just added an IDLE Dark theme with a deep cobalt blue background. For this, leave #002240 as is or change to another dark color.
We are planning to add a means to change all the normal backgrounds at once. Being able to affect dialogs will be a later project.
Following are the steps:
Click Apply and Then Click OK
Follow these steps & protect your eyes.
Open Python Folder from the path you selected during installing Python. In this case it is ( C:\Python27 )
In Python27 Folder, search for Lib and double click on it.
In the Lib folder, search for idlelib folder and double click on it.
In idlelib folder, search for CONFIG-HIGHLIGHT.DEF file and open it with any text editor tool like Notepad.
In the CONFIG-HIGHLIGHT.DEF file, paste the Monokai Code given below. Save and close the file.
HAPPY PYTHONING TO ALL NIGHT OWLS 🙂
FOR IDLE DARK BACKGROUND
The above answer of Daniel Puiu and Megha Chovatiya is so good. I follow their instruction and have extra personal experience that I also want to share:
This instruction will be detailed that can apply for custom version:
There is a small coding picture that you can click to select the specific coding parameter you want to change the color. Then:
Select «Background» radio button when you want to change the background of the text that seem to be the highlight color in word document
Or select «Foreground» to adjust the color of the text
And «Choose color for» to select color you want. You can look the coding picture at the same time to see your change
Furthermore, you could change the size of text or bold the text if you want by:
Go to «Fonts/tab» from the top horizontal tab and change the text following your style
Как сделать темную тему в idle python
Русские Блоги
Соответствие цвета кода Python IDLE и подсветка синтаксиса
Начинающий Python, я думаю, что IDE, которую все чаще всего используют на практике, — это IDLE, который поставляется с Python, но тема соответствия цветов по умолчанию и выделения синтаксиса на самом деле не подходит, поэтому нам нужно сделать небольшое украшение, например, следующее: Конфигурация украшения:
КАК ДЕЛАТЬ? Не беспокойтесь, просто следуйте пошаговым инструкциям, которые я представил.config-highlight.cfgФайл, где находится этот файл? Я составил список путей, где я могу его найти:
Для Windows вы можете напрямую открыть и начать работать или введите следующий путь в адресной строке для подтверждения:
Найди это имяconfig-highlight.cfgПосле файла вам нужно отредактировать его,Как? Не можете найти это? Неважно, мы можем создать новый config-highlight.cfg。
Конечно, когда дело доходит до редактирования, команда управления может также попробовать следующие команды в системе Linux:
Под системой Windows:
Хорошо, теперь мы должны были открытьconfig-highlight.cfgЭтот файл готов к редактированию. Например, я могу изменить этот файл для следующего содержимого, чтобы получить две темы подсветки кода с именами Obsidian и tango:
Тема танго — это эффект, отображаемый в начале статьи. Насколько это круто? Подождите, мы изменилиconfig-highlight.cfgЭтот файл не означает, что все кончено. Нам также нужно выбрать нашу тему в Python IDLE. Если Python IDLE уже открыт в настоящее время, сохраните необходимые файлы и снова откройте IDLE. После открытия выберите меню по очереди.Options – Configure IDLE…
выбратьHighlightingВкладка, тоSelectвыбратьa Custom ThemeКак показано на рисунке ниже, выберите одну из двух только что настроенных тем, здесь я выбираю танго.
Нажмите после завершения настройкиApplyилиOKПосмотрим эффект. Если есть детская обувь, как настроить шрифт? Это легко, вHighlightingРядом с вкладкойFonts/TabsВкладки можно использовать для настройки шрифта и ширины отступа:
Что ж, после завершения этих новых интерфейсов он должен быть представлен. Если вы не видите эффекта, пожалуйста, перезапустите Python IDLE.
IDLE цвет фона в питоне
Есть ли способ изменить цвет фона Python-3.5 IDLE под Windows 10? Я пробовал гуглить и читать документы, но не могу найти ответ. Я не уверен, что это даже возможно.
4 ответа
Для фонов текстового окна перейдите в Параметры => Настройки IDLE => Вкладка выделения. Сохраните встроенную тему (обе одинаковые) как пользовательскую тему с новым именем. Измените фон каждого элемента с белым фоном на нужный вам цвет. Нажмите Применить или ОК. Или скопируйте следующее в /.idlerc/config-highlight.cfg (которые могут или не могут уже существовать) и изменить #ffffff до вашего желаемого цвета.
Мы только что добавили тему IDLE Dark с глубоким кобальтово-голубым фоном. Для этого оставьте #002240 как есть или измените на другой темный цвет.
Мы планируем добавить средство, чтобы изменить все нормальные фоны сразу. Возможность влиять на диалоги будет более поздним проектом.
Ниже приведены шаги:
Нажмите Применить, а затем нажмите ОК
Следуйте этим шагам и защитите свои глаза.
Откройте папку Python по пути, который вы выбрали при установке Python. В данном случае это ( C:\Python27)
В папке Python27 найдите Lib и дважды щелкните по нему.
В папке Lib найдите папку idlelib и дважды щелкните по ней.
В папке idlelib найдите файл CONFIG-HIGHLIGHT.DEF и откройте его с помощью любого текстового редактора, например Блокнота.
В файл CONFIG-HIGHLIGHT.DEF вставьте код Monokai, указанный ниже. Сохраните и закройте файл.
ПОЗДРАВЛЯЕМ ВСЕМ НОЧНЫМ СОВАМ ПО ПИТОНУ:)
ДЛЯ ТЕМНОГО ФОНА ХОРОШЕГО ХАРАКТЕРА
Приведенный выше ответ Даниэля Пуйу и Мегха Човатия очень хорош. Я следую их инструкциям и имею дополнительный личный опыт, которым также хочу поделиться:
В этой инструкции будет подробно описано, что может применяться для пользовательской версии:
Есть небольшое изображение кодирования, которое вы можете щелкнуть, чтобы выбрать конкретный параметр кодирования, цвет которого вы хотите изменить. Потом:
Установите переключатель «Фон», если вы хотите изменить фон текста, который кажется основным цветом в текстовом документе.
Или выберите «Передний план», чтобы настроить цвет текста.
И «Выбрать цвет для», чтобы выбрать нужный цвет. Вы можете одновременно посмотреть кодовое изображение, чтобы увидеть свои изменения
Кроме того, вы можете изменить размер текста или выделить его жирным шрифтом, если хотите:
Перейдите на вкладку «Шрифты / вкладка» на верхней горизонтальной вкладке и измените текст в соответствии с вашим стилем.
Как сделать темную тему в idle python
First of all to find a file named config-highlight.cfg, where the file is located it? I have listed a list can be found in its path
system under Linux series path (Represents the user directory):
[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
[tango]
definition-foreground = #fce94f
error-foreground = #fa8072
string-background = #2e3436
keyword-foreground = #8cc4ff
normal-foreground = #ffffff
comment-background = #2e3436
hit-foreground = #ffffff
break-foreground = #000000
builtin-background = #2e3436
stdout-foreground = #eeeeec
cursor-foreground = #fce94f
hit-background = #2e3436
comment-foreground = #73d216
hilite-background = #edd400
definition-background = #2e3436
stderr-background = #2e3436
break-background = #2e3436
console-foreground = #87ceeb
normal-background = #2e3436
builtin-foreground = #ad7fa8
stdout-background = #2e3436
console-background = #2e3436
stderr-foreground = #ff3e40
keyword-background = #2e3436
string-foreground = #e9b96e
hilite-foreground = #2e3436
error-background = #2e3436
[blackboard]
keyword-background = #0C1021
definition-foreground = #D63A1B
error-foreground = #ff0000
string-background = #0C1021
keyword-foreground = #FBDE2D
hilite-foreground = #000000
comment-background = #0C1021
hit-foreground = #ffffff
builtin-background = #0C1021
stdout-foreground = #eeeeee
cursor-foreground = #ffcc00
break-background = #ffff55
comment-foreground = #505050
hilite-background = gray
definition-background = #0C1021
stderr-background = #0C1021
hit-background = #0C1021
console-foreground = #87ceeb
normal-background = #0C1021
builtin-foreground = #fd9902
stdout-background = #0C1021
console-background = #0C1021
stderr-foreground = #ff3e40
normal-foreground = #F8F8F8
string-foreground = #61CE3C
break-foreground = black
error-background = #000000
[twilight]
keyword-background = #141414
definition-foreground = #c86428
error-foreground = #ff0000
string-background = #141414
keyword-foreground = #c2964b
hilite-foreground = #00ffff
comment-background = #141414
hit-foreground = #ffffff
builtin-background = #141414
stdout-foreground = #eeeeee
cursor-foreground = #ffcc00
break-background = #ffff55
comment-foreground = #524d53
hilite-background = #0000a0
definition-background = #141414
stderr-background = #141414
hit-background = #141414
console-foreground = #87ceeb
normal-background = #141414
builtin-foreground = #ce3e24
stdout-background = #141414
console-background = #141414
stderr-foreground = #ff3e40
normal-foreground = #FFFFFF
string-foreground = #61CE3C
break-foreground = black
error-background = #000000
[desert]
keyword-background = #333333
definition-foreground = #98fb98
error-foreground = #ff0000
string-background = #333333
keyword-foreground = #cc6600
hilite-foreground = #000000
comment-background = #333333
hit-foreground = #ffffff
builtin-background = #333333
stdout-foreground = #eeeeee
cursor-foreground = #ffcc00
break-background = #ffff55
comment-foreground = #87ceeb
hilite-background = gray
definition-background = #333333
stderr-background = #333333
hit-background = #333333
console-foreground = #87ceeb
normal-background = #333333
builtin-foreground = #519e51
stdout-background = #333333
console-background = #333333
stderr-foreground = #ff3e40
normal-foreground = #f0e68c
string-foreground = #ffa0a0
break-foreground = black
error-background = #000000
[cobalt]
keyword-background = #001B33
definition-foreground = #FFDD11
error-foreground = #ff0000
string-background = #001B33
keyword-foreground = #FF7222
hilite-foreground = #00ffff
comment-background = #001B33
hit-foreground = #ffffff
builtin-background = #001B33
stdout-foreground = #eeeeee
cursor-foreground = #ffcc00
break-background = #ffff55
comment-foreground = #007699
hilite-background = #0000a0
definition-background = #001B33
stderr-background = #001B33
hit-background = #001B33
console-foreground = #87ceeb
normal-background = #001B33
builtin-foreground = #D40E36
stdout-background = #001B33
console-background = #001B33
stderr-foreground = #ff3e40
normal-foreground = #F8F8F8
string-foreground = #61CE3C
break-foreground = black
error-background = #000000
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 |
dsosby commented Aug 4, 2011
ghost commented Sep 28, 2012
In, config-highlight.cfg, copy and paste the code above.
dsosby commented Oct 25, 2012
kenhia commented Jul 17, 2013
VolcanoMax commented Jan 25, 2014
Python 3.3.3 on Win8.1
fatihmert commented Jul 30, 2014
t3hmun commented Jan 10, 2015
Manoj-nathwani commented Jan 16, 2015
This is perfect! Thanks 🙂
7oao commented Feb 20, 2015
Windows 7, search for the file \Python34\Lib\idlelib\config-highlight.def, open it, paste the «texto from above» and save it.
tmcowley commented Jul 21, 2015
Wow. This is amazing, thanks!
samuelsp commented Aug 1, 2015
Thanks dsosby and duphenix! It worked!
victorwestmann commented Sep 9, 2015
In Windows 10 Professional 64 bit architecture Python3.4.x is under the following path:
C:\Python34\Lib\idlelib\config-highlight.def
Thank you for this amazing theme! 😉
ninettekelly67 commented Oct 11, 2015
Nice one! looking good.
Jordan-McMillan101 commented Oct 17, 2015
My eyeballs thank you kindly.
darragh-murphy commented Nov 14, 2015
ozhuang commented Nov 28, 2015
For Python 3.5.0 in Windows 10,
C:\Users\AppData\Local\Programs\Python\Python35-32\Lib\idlelib\config-highlight.def
adrianmelic commented Jan 26, 2016
coderjxh commented Mar 4, 2016
It’s Perfect! Thank you o(^▽^)o
In my pc, configure file is in(Python 3.5.1 x64 in Windows 7) :
C:\Users.idlerc
vivekpathak commented Mar 8, 2016
Very nice. Any idea how to let decorators like @classmethod have a different color?
avmak commented Mar 23, 2016
frazer380 commented Apr 11, 2016
AquausDev commented Jul 13, 2016
Is there anyway to change the font?
vamshise commented Aug 8, 2016
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.
DanJ210 commented Aug 20, 2016
Ty for the theme and help with Windows 10. Using Python 3.5. This theme has lasted some years!
brianmaher84 commented Aug 26, 2016
Thanks I’ve forked because I like the colours but prefer a perfectly black background instead of the greyish one in this theme.
YaoPengCN commented Aug 31, 2016
It works. Thank you!
SmartMetal commented Sep 4, 2016
So nice, thanks boss!
1LoneWolf commented Sep 26, 2016
ghost commented Jan 2, 2017
Great theme, thanks!
visbond commented Feb 16, 2017
blessengeorge commented Apr 2, 2017
Thankyou this is amazing!
DataDrover214530 commented Jun 22, 2017
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.
avelinojr commented Jul 14, 2017
Thankyou this is amazing! (x2)
codecobber commented Dec 14, 2017
Brilliant, just what I was looking for, thankyou
Discipuli000 commented Dec 22, 2017
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.
diortemew commented Mar 21, 2018 •
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 = #0
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
Python IDLE — интегрированная среда для разработки
IDLE ( I ntegrated D evelopment and L earning E nvironment) — это интегрированная среда для разработки (и обучения), которая поставляется вместе с Python. Сама IDLE написана на Python с использованием библиотеки Tkinter, поэтому является кроссплатформенным приложением (может работать на Windows, Mac OS, Linux).
IDLE это по сути текстовый редактор с подсветкой синтаксиса, автозаполнением, умным отступом и другими функциями для удобства написания кода на Python.
В данной статье рассмотрим основные принципы работы с IDLE.
Запуск IDLE
Перед запуском IDLE необходимо установить Python
IDLE в Windows находится в меню » Пуск » → » Python 3.x » → » IDLE «. Также можно быстро найти его через » Поиск » около меню » Пуск «, набрав в поле поиска «IDLE»:
sudo apt-get install idle3
Интерактивный режим
REPL режим можно запустить в любой консоли, но IDLE дает ряд преимуществ, которые мы разберем ниже.
Подсветка синтаксиса
Прежде всего подсветка синтаксиса упрощает жизнь программиста. Чтение и написание кода становится более удобным — каждая конструкция языка подсвечивается определенным цветом. Комментарии красным, строки зеленым, вывод синим и т.д.
Отступы
Отступы в IDLE создаются автоматически. По умолчанию их размер равен 8-ми пробелам.
В REPL режиме команды исполняются построчно, однако IDLE понимает, что для некоторых инструкций (if-else, while и т.д.) необходим многострочный ввод. Когда вы ввели первую строку, например if n == 0: и нажали «enter», IDLE перенесет курсор на новую строку и автоматически создаст новый отступ.
Небольшая инструкция по работе с отступами:
Autocomplete
Подсказки к функциям
При вызове функции или метода, после открывающейся скобки (где далее будут прописаны аргументы) IDLE отобразит подсказку. В ней будут описаны аргументы, которые ожидает функция.
Подсказка будет отображаться до тех пор, пока вы не закроете скобку.
История команд
Чтобы полистать историю введенных ранее команд, установите курсор после » >>> » и выполните комбинацию Alt + n (листать вперед) или Alt + p (листать назад).
Если же вы нашли команду в окне и хотите ее скопировать, поставиться курсор в конец этой команды и нажмите «enter».
Режим редактирования файлов
В новом окне доступен тот же функционал, что и в интерактивном режиме. Однако разница все же есть — в режиме редактирования файлов используется 4 пробела для отступа, в отличие от интерактивного режима (там используется 8 пробелов).
Теперь, чтобы запустить код, выберите «Run» → «Run Module» (или F5). Откроется новое окно Python Shell с результатом выполнения нашего кода.
IDLE особенно удобно использовать при обучении языку Python, чтобы быстро проверять на практике команды и инструкции. Также, в режиме REPL, IDLE имеет ряд преимуществ перед обычной консолью (подсказки, подсветка синтаксиса, авто-отступы и др.)
Однако имеющегося функционала может оказаться не достаточно для серьезной разработки. Стоит присмотреться к PyCharm или VSCode.