Episode Transcript
Available transcripts are automatically generated. Complete accuracy is not guaranteed.
Speaker 1 (00:04):
Welcome back aliens, my name is Abhinav Reddy and let's
continue with this series on Python. In fact, till this
point we have seen basic stuff, right? But now we
have a question, you know, till this point we are
using IDLE as our IDE.
Speaker 2 (00:17):
But what if you want.
Speaker 1 (00:18):
To use command prompt? You know, normally when you work
with shell or command prompt, you want to access Python
on the command prompt.
Speaker 2 (00:26):
How do I do that? Let me just try.
Speaker 1 (00:28):
So if I open my command prompt, if I say
cmd enter, and now if I type a command, let
me just try. So command is Python. You know, in Python,
we have certain libraries which we will be using later.
So Python supports certain libraries which we can use to
make our project efficient.
Speaker 2 (00:44):
So to access those libraries, we need the command, right?
Speaker 1 (00:47):
So here, if I say Python, if I say enter, oh,
it says Python is not recognized.
Speaker 2 (00:52):
That's weird. That's bad about this, right? How do I
make it work? Now, what's wrong here? The thing is,
we have installed Python, right? What is wrong? The thing is...
You have installed Python in your C drive somewhere. Okay.
And CMD is not able to get the path of it. Okay.
Speaker 1 (01:08):
So if CMD is not able to get the path
of it, that means you need to specify that by yourself.
There are multiple ways of doing this. One is by
saying set path. This is a command which you have
to use equal to and you have to specify the
path here. But this is a temporary setting, you know,
because the moment you close your command prompt and reopen it,
you will lose the path. If you want to make
(01:30):
it permanent, what you will do is you will go
to your C drive and here you will right click
on the screen and you have to say properties. Click
on advanced system setting. go to environment variables again you
can directly go from your from the start menu itself
we just type environment variables you will get it.
Speaker 2 (01:46):
And here you have to set the path but.
Speaker 1 (01:48):
Well i will i will change the system variables and
if i double click on this path you can see
we got the prompt here and in this prompt you
need to add the path but which path i don't.
Speaker 2 (01:57):
Know let's open our my computer and go to c drive.
Speaker 1 (02:01):
So in C drive, go to users and then your folder.
Speaker 2 (02:04):
So first of all, you need to go here. So
in C drive users.
Speaker 1 (02:07):
Whatever username you have and then app data inside this,
if you click on local and then you have to
go to programs, Python and then this one. So when
you open your my computer, you have to go to
this part, which is which is visible there. And depending
upon your username, it might change. Depending upon the version
which you are using, it will change. But then this
is one of the paths we have to use. So
I will copy this path, go back to the environment
(02:29):
variables and click on new, paste. So we have done
with the first path. But we have to specify two
paths here. The first one is that which I have
mentioned and then script as well. So this one as well.
So copy it and go back, say add, paste and OK.
So by doing this, you are setting the path now. OK,
once you have done that, close everything. Go back to
(02:50):
your command prompt. If you try now typing Python, it
will not work. You need to make sure that you
restart your command prompt. I'll close this. Type cmd. Now
let's try typing Python, and it works. You can see
we got a Python prompt here. Let's verify. 2 plus 3,
always say enter, you got 5.
Speaker 2 (03:10):
It's working, you know. Okay, everything is working. Everything is fine.
Speaker 1 (03:13):
In fact, you know, the best way to check Python
is by using print, hello world, print, and hello world,
say enter.
Speaker 2 (03:20):
It works, right? Python is working. So this is how you.
Speaker 1 (03:23):
Set the path if you want to access Python in
your machine.
Speaker 2 (03:26):
OK, that's great.
Speaker 1 (03:27):
Now, once you have talked about this, we have another
thing to talk about is help. Now, you know, when
I was learning C for the first time, it's way back.
And at that time when I wanted to explore C programming,
because in books as well, you will get limited knowledge.
And in lectures as well, you will get limited knowledge.
If you want to enhance your skills, what I should
do is. In Turbo C + +, we used to
(03:48):
have this help option where you will see all the
header files and you can see what is happening in that.
In the same way, in your Python as well, we
have help option. If you want to access that thing,
it's very simple. Just type help and give a round
back and say enter. It will open a help prompt
for you. Okay, now what help you need? Now, basically,
(04:09):
Python has.
Speaker 2 (04:10):
Certain modules you can explore.
Speaker 1 (04:12):
But how do we know which module it has? Okay, well,
I don't know. So what I will do is I
will type topics. In fact, if you see the docs there,
it says search for topics. In fact, you can also
search for something which we have used till now and
say enter. You can see we got list of modules
available or topics available.
Speaker 2 (04:27):
Okay, which one do you want to know about? Let's
say I want to know about.
Speaker 1 (04:30):
I want to know about list because we have seen that, right? So,
I will type list. Okay, this thing tells everything about
list now. So, if you scroll down, we have some
methods here which we have used, if you remember. So,
these are the methods which we can use, you know. So,
it talks about everything. So, which version has included which things.
And this is amazing, you know. Instead of buying a book,
instead of... Of course, you should be watching my videos.
(04:52):
And then with my videos, you can read the documentations, right?
It will be very helpful. So this is about list. Okay,
now how do you go back to your command prompt?
How do you go back to the prompt? You simply
say quit, enter, you're back now. And let's say if
you want to find help on a specific topic, you
know about the topic. So you will simply say help
and in single quote you will specify list. You don't
(05:14):
have to go to help and then search. You can
do it from here as well if you know the
command and you can see we got the information about list.
So that's how you can explore different topics and you
can read.
Speaker 2 (05:25):
Reading is very important, you know.
Speaker 1 (05:27):
So that's about this video where we have talked about
how to set a path and how to explore the
help option.
Speaker 2 (05:33):
So that's it.
Speaker 1 (05:33):
I hope you're enjoying this series. Let me know in
the comment section and do click on the like button
if you're enjoying it. Thank you so much for watching, everyone.
Speaker 2 (05:38):
Bye-bye.