python-idle

Can I use IDLE to debug a program that reads from standard input?

Can I use IDLE to debug a program that reads from standard input? Question: I’m debugging a long source code file that takes many inputs from the keyboard. I want to step through the program to see variable values, but I can’t get the Python IDLE debugger to take standard input. I’m aware I can …

Total answers: 1

New line character does not work in a return string in Python

New line character does not work in a return string in Python Question: Here in the below code, I try to do a calculation in a function and then I return all the values in a string to the main program body in Python. The issue here is the new line character n does not …

Total answers: 3

What is the logic used to break down multiple lambda variables in python?

What is the logic used to break down multiple lambda variables in python? Question: I am trying to reason through why the result of the following would be 8 but I’m a little stuck. f = lambda x,y: lambda z: (x)(y)(z) print((f)(lambda x: lambda y: x, lambda z: z*2)(3)(4)) I know that the next step …

Total answers: 1

Can Python Embeddable Package Install IDLE Separately?

Can Python Embeddable Package Install IDLE Separately? Question: A Python embeddable package can install pip separately (pip with embedded python), but can it also install IDLE separately? As the embeddable package has pythonw.exe already, I tried to externally load idle.pyw with it, but more seem to be needed. Asked By: Junyong Kim || Source Answers: …

Total answers: 1

How to use Pygubu – Python

How to use Pygubu – Python Question: I am trying to use pygubu from the first time to make better GUI’s. I have installed it using pip and it has installed correctly. However when I try and run the example code Here (At the bottom of the web page) I get the error AttributeError: module …

Total answers: 2

Python IDLE won't open with .py file, only from start menu

Python IDLE won't open with .py file, only from start menu Question: I’ve looked through many similar questions, but no one seems to have had this same problem. I can open the IDLE shell perfectly fine from the start menu. Once in, I can use File->Open to open any .py file. However, my problem is …

Total answers: 3

Python – Changing IDLE Text color not working on Windows

Python – Changing IDLE Text color not working on Windows Question: I am using colorama to try to simulate in the IDLE shell. Here is my code: from colorama import Fore, Back, Style print(Fore.RED + ‘some red text’) print(Back.GREEN + ‘and with a green background’) print(Style.DIM + ‘and in dim text’) print(Style.RESET_ALL) print(‘back to normal …

Total answers: 3

pytorch runs in anaconda prompt but not in python idle

pytorch runs in anaconda prompt but not in python idle Question: I know this question might be stupid, but I couldn’t find any help on the internet. Recently I installed anaconda in my computer, it runs Windows 10 x64. Then I used anaconda prompt to download and install pytorch for 3.6 python: conda install pytorch …

Total answers: 2

Python IDLE running code differently than other IDEs

Python IDLE running code differently than other IDEs Question: I’m trying to get threading to work with a Socket network to accept clients. I had that working fine, but now I have discovered an issue. Here is the code: clients = [] def myFunction(): #Not too relevant I think server.listen(0) conn, addr = server.accept() print(conn) …

Total answers: 2