Python Forum

Full Version: I have a question from a YouTube video I saw:
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
At the 2:54 mark of this video below, the teacher suddenly goes from this while.py program to a Python 3.3.3 Shell,
which then prints out a loop that starts with "Hi! I am 1"
Can you tell me how he got from one step to the other? :)?





https://www.youtube.com/watch?v=xCaa4ig2lhU
I'm assuming he used a keyboard shortcut (looks like it's F5 in IDLE) to run the code.
he simply run the while.py. Because he is using IDLE - go to Run menu -> Run Module (if I remember correct) or simply press F5
I don't understand. I'm a little new to this. :)

He was using Python IDLE to run while.py?

When you say to use the RUN command, are you talking about
just going to the left bottom corner of my screen where the Windows icon is,
right clicking on that, and then clicking on RUN?

Or is this a RUN command that is located in a different area?

At the end of the video, I don't understand how he then got that endless loop to run. I could not even get it to appear.

He says he's going to run the program in the video, and suddenly
this appears:

Hi! I am 1
Hi! I am 2
Hi! I am 3
Hi! I am 4
Hi! I am 5
I couldn't get any of it to appear. How did he get it to appear? :)

He goes from

while.py - C:/Users/Madhur/Desktop/while.py

to

Python 3.3.3 Shell


and I can't see what happened in between those two steps.


Thanks

I don't see an edit button.
At the top there is menu bar with File, Edit, Format, Run, etc.
Or simply press F5
And when you press F5, what does that do? :)
(Dec-27-2017, 07:08 PM)nelsonkane Wrote: [ -> ]And when you press F5, what does that do? :)

obviously RUN the while.py script
Hitting F5 does not make this below appear for me:

Hi! I am 1
Hi! I am 2
Hi! I am 3
Hi! I am 4
Hi! I am 5

etc.
You have to be running "IDLE" itself, not the command terminal. If you are using Windows, go to the "Start" menu, go to the Python folder and expand it, then click on the "IDLE" entry. You can also use "pythonwin" which is a little better (also located under the Python heading).

Since I don't use IDLE, I don't know how you access it on other OS's
Here i image i posted before.
When you open IDLE you are not in the right window,it opens in interactive shell.
[Image: Wn7asS.jpg]