python-idle

Python freezes when configuring IDLE

[亡魂溺海] 提交于 2021-01-28 04:46:42
问题 So, recently I was using the Python theme function for the IDLE program itself. I downloaded three themes and built my own one, which is selected now. The problem is, I forgot to set colours for the blinker and highlighting, which is hugely problematic. When I went to see if I could change back to the default setting, Python IDLE simply froze up when I selected 'Configure IDLE' under options. I can still scroll through the file, attempt to close the window and minimise it etc, but it has just

How to clear the screen of ALL text in IDLE shell?

百般思念 提交于 2021-01-27 18:10:51
问题 I want to create a text based GUI for a python game. I intend to move a character around between multiple lines of text. after hours of searching online, the solutions I found don't work for this. I want something that will erase all text on screen, so I can re-print the same line, but with the character moved one space. To be clear, the screen I want to erase is the one that appears when you hit "run module" in IDLE. Also, I cannot import any external libraries, because for some reason, that

How to clear the screen of ALL text in IDLE shell?

蓝咒 提交于 2021-01-27 17:59:22
问题 I want to create a text based GUI for a python game. I intend to move a character around between multiple lines of text. after hours of searching online, the solutions I found don't work for this. I want something that will erase all text on screen, so I can re-print the same line, but with the character moved one space. To be clear, the screen I want to erase is the one that appears when you hit "run module" in IDLE. Also, I cannot import any external libraries, because for some reason, that

How to make IDLE automatically import modules at start?

老子叫甜甜 提交于 2021-01-27 17:51:35
问题 Often when I am using the IDLE shell I import the pickle module. Is it possible to make it automatically import pickle when I start it? 回答1: You can use the -c or - r argument: From idle -h : -c cmd run the command in a shell, or -r file run script from file For example: idle -c 'import pickle, sys' Or: idle -r ~/my_startup.py Where my_startup.py might contain: import pickle, sys You can either create a shell alias to always use this, or create a separate script; the procedure for this

IDLE 3.8.4 and 3.9.0b4 won't save files with non-ascii characters

夙愿已清 提交于 2021-01-22 06:50:41
问题 Edit : adding "import io" in iomenu.py fixed the problem indeed. Thanks a lot Terry! Original: Like the title said : I'm using IDLE (Windows) to write scripts in python, but it won't save (ctrl+s, manual save, or the save at exit). It doesn't freeze or crash, it just doesn't save (I can tell by the * before the name of the file on the windows title). After some tries I realized that it happens only when I'm using letters with diacritics in the text (I'm French so it will be éèêàç...). As soon

Change IDLE Shell window title

家住魔仙堡 提交于 2020-07-23 06:48:06
问题 I'm using multiple instances (idle/shell) of python and they both have the same title ('Python 3.8.1 Shell'). How I can change it directly from python shell? Os Windows. I tried, but this is not helped me: import ctypes ctypes.windll.kernel32.SetConsoleTitleA("My New Title") also tried: >>> from os import system >>> system("title " + 'abc') Screenshot that demonstrates a same titles 回答1: IDLE intentionally isolates its GUI, including Shell, from the running of your code. By default, they run

Change IDLE Shell window title

这一生的挚爱 提交于 2020-07-23 06:46:19
问题 I'm using multiple instances (idle/shell) of python and they both have the same title ('Python 3.8.1 Shell'). How I can change it directly from python shell? Os Windows. I tried, but this is not helped me: import ctypes ctypes.windll.kernel32.SetConsoleTitleA("My New Title") also tried: >>> from os import system >>> system("title " + 'abc') Screenshot that demonstrates a same titles 回答1: IDLE intentionally isolates its GUI, including Shell, from the running of your code. By default, they run