Hello, I'm Tom Hawkins
I'm assistant professor at Bossier Parish Community College and I teach programming,
and today what we're going to do is we're talking about one of my favorite
programs, languages, which is Python and I probably already decided that you know
this one program you're going to be working in. So today on this segment, we're
going to talk about a design environment. Now every program language has some
method to write the language and it might be maybe even just note pad, you can
do that with Python, but Python comes with its own integrated development
environment, if you're as old as I am you might have heard it called integrated design environment,
it's been known by a couple different words. So what we're going to
talk about is using Python idle. Now basically we're gonna cover the download
from www.python.org, we're going to talk about installing this Python language
into your computer so you can use it, we're going to talk about using this
integrated development environment and we're even going to get to the point of
writing your very first program. So let's get on with it. What I want to do is
follow this through if you go to any browser and in the address bar type
www.python.org. Now this will bring up the picture that we've got there you
go to this website and find the download area and we're going to select Python 3.4.3
and from there there's two different ways of doing it. So what we're
gonna do to begin with is I'm going to bring up the Internet Explorer and we're gonna...
We're gonna show that to you, so we can see what this looks like. Now up here in the address bar
I'm going to type www.python.org O R G
and you can see this is the python website and we have right here downloads, now there's two different
ways you can do this, you can go to downloads and you can either download it
right here from this yellow box area, or we can
go download and we can select this box right here.
The important thing is make sure you pick 3.4.3, and by the
time you watch this, we may have already added another version to it
3.4.4, or might even be 3.5 in any case take the version
3. and whatever the most current one is and download it. Once you
click on it of course, it's going to start some download question. Now according to
the operating system you've got, it might have this statement down here to run it
or save it or it might ask you just to save it. It's all according to how your computer
is set up. Once we've done that, then what we're going to wind up with is down here
in my particular download area, you might find the file or if you
started just run, for instance here it might download in your program
right in this area the profile will be will look like this python 3.4.3.
MSRI, that's the file that is the install file. Once you
started running what I want to do is just follow the defaults
just it'll be a nice depiction and is very straightforward, it's not very
complicated at all, very very simple just follow the defaults, go "next" next
and once it's installed now you have the problem of trying to use this. Now the
problem comes about is that a lot of people may automatically go to your
Windows Explorer and find the executable or the file that this starts all this
while you might have a little bit of a problem with it because the Python idle
is not found in the folder where it was saved but what it does do is it puts a
shortcut on your start button, so what I want to do is go back here to your start
button, open it up and what you're going to find you may find it right here, you may
have to go down here to your search engine to the little search bar and type in
I-D-L-E
for idle, and this is a play on the words of integrated development environment.
Once you do that then you can see it go ahead and click it and its
going to show you the next step.
Now this is the Python idle. This is your design environment we call this a Python shell
and I'm going to rearrange these a little bit so it's over here on one side, now the
Python shell is an interpreter, all it does is it reads the code one line at a time,
so if we go off and say print "hello world" by the way just as a side
note someone started this a long long time ago and they printed 'hello world"
it seems so simple to print but you'll find that printing something
simple like this what it does is it
test's the whole design development environment the whole program is tested
from your typing, to the compiling, to the resulting comes out from
the end so what we're doing is we're testing your set up to make sure that
you've got it all done right. So we're going to say print "hello world" and I
hit the enter key to type the next line and it reads it automatically and it also
displays it so we have interpreted this print statement into a statement of "hello world".
Obviously this isn't going to work for long programs so from here what I want you
to do is go up to file new file and you going to get a new window I'm going to
rearrange that a little bit so you can see both of them side by side now from here
where you can see this is, you're going to be able to see both pages if you will the
one on your left is going to be the Python shell that's where your program
is going to be run, the one on the right is where you're actually going to write
your programs, programs that are written in this are compiled and then run in
complete in the python shell, you can also run python files in a dos terminal
screen or console screen as we used to call it, but in this particular case we'll
just use these just for the designing of it. Now the way you can tell this
#1 it's untitled, #2 you will see a run is the fourth menu item and
that fourth menu item there will be run and when you click on it,
run module. This is how you're going to run your programs. So we can now take
this and say print "Hello world", and we can hit the enter key we will print
something else. Now I'm writing the Python language so it's fairly simple no punctuation.
"I'm trapped and I can't get out."Now what I've done here is so separated these
using quotes to put the string or the text in there and by doing
that you'll notice that I'm able to use contractions such as ' for I am in the
' for can't. Now I can take these two and now I'm going to have to save it so I go
to File Save As and it doesn't matter where i save it I'm just going to go ahead and
save it in this particular folder and I've got "Hello World" already there so
I'm just going to put hello world two, and then hit Save.
Now that I've saved this, I can now go to Run, fourth item on the list, and Run Module.
There it goes. And I have "hello world I'm trapped and I can't get out" notice it even includes the
little space that I added in the in the program line.
So now
you can see how the whole process works, the programs are written on
this screen over here remember once you go file new file or my save file new
window will see what the next version of python does, then you can type in all
of your lines on the window that's on your right and you can tell it's the
right one because you look up there you'll see run with run model where the
Python shell says that across the title bar says Python shell you know that's
not the right one that's going to be where the program is run.
So we've talked about how to install it, we talked about how to open it, we've
talked about writing files and make sure it's saved, you can try these small
programs and you'll find that they also were we'll talk more about how to write
the program itself and of course running the program and that should get you
started with Python and that should get you get you a design environment or
integrated development environment that you can now start learning how to run
and write in Python. So thank you very much for your attention.