Good day!
Today I was writing a small script with Python 3.2.2, and this simple piece of the code
decided to give me trouble.
def main():
yn = ""
#...
while True:
#...
yn = input( "---> " )
if yn.lower() != "y":
break
Now, it should be pretty obvious what this code does however when I run it in IDLE on
Windows 7 it works perfectly fine, alternatively when I double click on the script’s icon
on my Desktop and open it, it does not matter weather or not I enter “y” it closes, of
course this is an easy fix by
writing:
if yn.lower() == "n":
#...
which is what I did, however I was wondering what the cause of this could be?
It works for me on OSX (Python 3.2.2):
What executable is associated with the .py extension?