Questions tagged [python-idle]

IDLE is Python's Integrated Development and Learning Environment. It is part of the standard Python distribution.

IDLE is Python's Integrated Development and Learning Environment. It is part of the standard Python distribution. Though lightweight, it has a fairly rich feature set, including a code editor and a shell (in separate windows). It is written in Python using the tkinter toolkit.

1318 questions
-2
votes
1 answer

Install python package

Can we install python packages in IDLE (Python Shell)? I know how to do it in windows cammand prompt. But I want to install packages in python shell. If yes how?
-2
votes
1 answer

Python text game health bar

I'm making a text adventure I'm using def do_health print health,"/ 200" to display health but I want to convert it to a percentage and print something like |---------- | 50% depending on what percentage of health the player…
Nathbesspop
  • 5
  • 1
  • 3
-2
votes
2 answers

Proper installation of Python 3.6 on Ubuntu 14.06 to include IDLE

I am trying to install Python 3.6 on Ubuntu 14.06. I have tried the get-apt command and I have tried to install from a tarball. Either way this is the error I receive. :~/Downloads$ pip install Python-43.4.6.tar.gz Requirement…
prophet
  • 3
  • 1
  • 2
-2
votes
1 answer

No highlight colors after saving (default IDLE Editor)

Python IDLE Editor doesn't seem to be working for me. As can be seen in this picture, if, 'hello' and None are all highlighted with different colors when the document is "untitled" (not saved) but as soon as i save the document the colors disapear…
-2
votes
1 answer

How can I edit and run a python file .py with IDLE

class Person: def __init__(self, first, last): self.firstname = first self.lastname = last def __str__(self): return self.firstname + " " + self.lastname class Employee(Person): def __init__(self, first, last,…
Delino
  • 1,049
  • 12
  • 9
-2
votes
1 answer

How to fix Python restarting whenever I start program on IDLE environment?

import random winning_conditon = 0 no_of_guesses = 0 comp_guess = random.randint(1,100) while (no_of_guesses == 11) or (winning_conditon == 1): user_guess = int(input("What is your guess? ")) if user_guess < 1 or user_guess > 100: …
owlpants
  • 23
  • 3
-2
votes
1 answer

Program will not let me store only the last three scores of the user

if class_number == 0: #This will create and open a new text file under the name #of the class_tag variable. file = open("Class 0" + ".txt", "a") #This will write down the user's name and their score file.write(str(name) + "…
A MUSE
  • 35
  • 6
-2
votes
2 answers

How do I run my Python script using Tkinter?

I'm trying to get my script to run when I press a button on my UI, not sure how to get it to work. Any ideas? Example: from tkinter import * root = Tk() def OpenPro1(): print("Hej") button_1 = Button(root, text = "Hejdå", command =…
Aroronon
  • 21
  • 1
  • 1
-2
votes
1 answer

Can't Open Python IDLE

Getting the following code opening in the console in 9 separate screens when I try to open Python IDLE. As far as I'm aware, there isn't anything that I have done to the original install. Any ideas? Tried uninstalling and reinstalling but no luck.…
user1480135
  • 137
  • 1
  • 2
  • 14
-2
votes
3 answers

Halving each continuous number looping

A cup is poured 1/2 full, then 1/4 full, then 1/8 full and so forth. Construct a loop that calculates how full the cup is after a given number of pours. My question here is how to halve each number after the last so far i have cup=0 while cup<1: …
-2
votes
1 answer

Reading answers from separate file

I am stuck with this code. So, I am making an IRC bot which answers peoples questions. When a question is asked, I write it to a .txt file; Main.py Import os Import hi Question_file = 'question.txt' Answer_file = 'answer.txt' while True: …
-2
votes
1 answer

Storing certain input

Here's my code; locat_file = 'info/locat.txt' Import os If not os.path.exists(locat_file): #Ask location locat = raw_input("Where are you from?\n").title with open(locat_file, "w") as f: f.write(locat) f.close This code…
-3
votes
1 answer

Are saved IDLE files saved forever?

If you create, save and run a Python IDLE file, is the file saved forever?
user8518239
-3
votes
1 answer

Problems in IDLE: can't install numpy

I install some libraries like numpy from my terminal but it doesn't seem to install on my IDLE which says "no module called numpy". What might be the problem?
-3
votes
1 answer

Exit command without confirmation in python

In Python if the exit() command is raised, it will confirm before exiting. I do not like the idea of clicking the exit button every time. Is there a way to bypass this confirmation? (This is using the IDLE shell)
Bill Wang
  • 140
  • 13
1 2 3
87
88