1 00:00:00,000 --> 00:00:02,600 [no audio] 2 00:00:02,610 --> 00:00:04,099 Hi friends, in this video 3 00:00:04,099 --> 00:00:07,900 we are going to see the different types of editors to write 4 00:00:07,900 --> 00:00:10,200 your python code. Right. 5 00:00:10,400 --> 00:00:14,500 Let me start that. See we have different types of editors, 6 00:00:14,500 --> 00:00:19,800 like IDLE, vi/vim editors, Notepad/Notepad++, 7 00:00:19,800 --> 00:00:24,900 PyCharm, Spyder, PyDev, Sublime Text, Atom, and so 8 00:00:24,900 --> 00:00:32,100 many, right. So guys here among all your vi/vim editor 9 00:00:32,500 --> 00:00:36,500 is the command line editor, and remaining all are IDLEs, 10 00:00:36,500 --> 00:00:38,900 I mean remaining all are GUI editors. 11 00:00:40,300 --> 00:00:44,200 Right. So guys as an Automation Engineer, right, 12 00:00:44,200 --> 00:00:47,200 first of all you should be good with how to use either 'vi' 13 00:00:47,200 --> 00:00:48,400 or 'vim' editors. 14 00:00:49,900 --> 00:00:52,200 And you know by default, right, 15 00:00:52,200 --> 00:00:57,400 you won't get 'vi' or 'vim' editors on your Windows. 16 00:00:57,600 --> 00:01:01,000 But anyway you will get by default this 'vi' or 'vim' editors on 17 00:01:01,000 --> 00:01:03,300 your Unix-like systems, right? 18 00:01:03,500 --> 00:01:07,400 So I am going to provide the link to install 'vim' on your 19 00:01:07,400 --> 00:01:09,600 Windows operating system below of this video. 20 00:01:09,600 --> 00:01:12,600 We just go through that so that you can be able to install 'vim' 21 00:01:12,600 --> 00:01:15,000 editor for your Windows operating systems 22 00:01:16,700 --> 00:01:20,400 and anyways to install 'vim' on your Unix-like systems because 23 00:01:20,400 --> 00:01:24,500 by default you will get 'vi', or on some like Ubuntu operating 24 00:01:24,500 --> 00:01:26,100 systems you will also get 'vim', 25 00:01:26,100 --> 00:01:30,500 right. In case if you want to install suppose on Linux 26 00:01:30,500 --> 00:01:36,000 your 'vim', simply 'yum install', right, 'yum install vim'. 27 00:01:36,000 --> 00:01:38,400 That's it. Very simple, right? 28 00:01:38,400 --> 00:01:40,100 So based on your Unix-like systems 29 00:01:40,100 --> 00:01:42,100 you have to run your command to install 'vim'. 30 00:01:42,700 --> 00:01:45,100 Anyway by default you are going to get 'vi', that's fine. 31 00:01:46,300 --> 00:01:48,700 Now, what is this IDLE? 32 00:01:50,400 --> 00:01:55,300 So guys, IDLE means Integrated Development Environment. 33 00:01:56,200 --> 00:02:00,700 See once if we install your Python on your Windows operating 34 00:02:00,700 --> 00:02:05,100 systems by default this IDLE will be installed. Just go 35 00:02:05,100 --> 00:02:08,100 to your 'Start' after installing your Python, and see that there 36 00:02:08,100 --> 00:02:11,600 is an IDLE called Python 3.7 64-bit. 37 00:02:12,600 --> 00:02:14,100 Right. If you open that, 38 00:02:15,100 --> 00:02:16,100 you just click on that. 39 00:02:16,100 --> 00:02:20,400 [no audio] 40 00:02:20,400 --> 00:02:24,300 So it is going to open a Python Shell or Python command line. 41 00:02:24,300 --> 00:02:26,400 [no audio] 42 00:02:26,400 --> 00:02:29,900 Right. So I'm going to start it. Very first time it will take some time. 43 00:02:29,900 --> 00:02:37,000 [no audio] 44 00:02:37,000 --> 00:02:38,300 So just wait. Yeah, 45 00:02:38,300 --> 00:02:39,600 it's opening. Yeah, see here. 46 00:02:39,600 --> 00:02:41,900 [no audio] 47 00:02:41,900 --> 00:02:45,500 So this is Python Shell, guys. Not only here, if you open simply 48 00:02:45,500 --> 00:02:50,200 your Windows terminal, and there if you enter simply 'python', 49 00:02:50,600 --> 00:02:53,300 you are entering into your Python terminal or Python Shell 50 00:02:53,300 --> 00:02:55,300 or Python command line. Both are same. 51 00:02:56,600 --> 00:02:58,900 So this is by default 52 00:02:58,900 --> 00:03:01,900 you are getting some Python Shell command line by opening 53 00:03:01,900 --> 00:03:05,500 your IDLE terminal, or from your Windows operating system 54 00:03:05,500 --> 00:03:07,800 if you type simply 'python' you are entering into this one. 55 00:03:07,800 --> 00:03:10,700 Not only here even on your Unix-like system also from command 56 00:03:10,700 --> 00:03:15,400 line if you enter 'python', then you will enter into your Python Shell, 57 00:03:15,400 --> 00:03:16,500 or Python command line. 58 00:03:17,100 --> 00:03:18,500 So what is the purpose of this? 59 00:03:19,700 --> 00:03:24,300 Nothing is there guys. If you have a Python program which consists 60 00:03:24,300 --> 00:03:27,300 of suppose some 100s of lines, maybe 2 lines also, 61 00:03:27,300 --> 00:03:31,000 or maybe one line also, each and every line individually 62 00:03:31,000 --> 00:03:33,000 you can execute here one by one. 63 00:03:33,000 --> 00:03:34,900 [no audio] 64 00:03:34,900 --> 00:03:40,400 Okay, that is the purpose of your Python Shell. Now these 65 00:03:40,600 --> 00:03:42,100 and this one both are same. 66 00:03:43,200 --> 00:03:46,900 Right. Now from here if you open, simply if you click on 'File', 67 00:03:47,400 --> 00:03:51,100 and click on 'New File', it is going to create a editor like 68 00:03:51,100 --> 00:03:52,200 your Notepad. 69 00:03:52,200 --> 00:03:54,900 So here you can write your Python program and you can save 70 00:03:54,900 --> 00:03:56,800 it. Let me write simply something called, 71 00:03:56,800 --> 00:04:05,900 [no audio] 72 00:04:05,900 --> 00:04:07,300 Python 3.x, 73 00:04:08,300 --> 00:04:15,500 right. Let me save this, 'Ctrl + S'. So you have to save somewhere. 74 00:04:15,500 --> 00:04:20,700 I'm going to save it on my 'Desktop', simply 'demo.py', and 75 00:04:20,700 --> 00:04:25,399 then go to 'Run', then 'Run Module', or directly you can use 'F5' 76 00:04:25,399 --> 00:04:26,600 also in your keyboard. 77 00:04:27,600 --> 00:04:31,000 So this result you are getting on your Python Shell. 78 00:04:31,700 --> 00:04:37,000 This is one way. Or suppose if we have your 'vim' 79 00:04:37,000 --> 00:04:38,600 editor, from command line 80 00:04:38,600 --> 00:04:41,400 also you can write a Python program like 'vim'. 81 00:04:41,500 --> 00:04:43,000 Let me write 'demo.py' 82 00:04:45,200 --> 00:04:49,100 Right. I'm opening that 'demo.py' file, and there I am going to 83 00:04:49,100 --> 00:04:50,700 write my Python program. 84 00:04:50,700 --> 00:04:53,800 So already it is there somewhere. So three lines of code 85 00:04:53,800 --> 00:04:58,800 is there, right. So let me run this. 86 00:04:59,300 --> 00:05:02,000 So simply to run your Python programs, 87 00:05:02,000 --> 00:05:06,000 'python demo.py', that's it. 88 00:05:06,300 --> 00:05:09,700 So if you observe, I'm having three lines of code here. Now 89 00:05:09,700 --> 00:05:10,900 these three lines of code 90 00:05:10,900 --> 00:05:13,100 I can run from my Python Shell as well. 91 00:05:13,100 --> 00:05:16,400 Let me take first line, and copy and paste it, and execute 92 00:05:16,400 --> 00:05:18,400 it. Yes, you are getting output. Now 93 00:05:18,400 --> 00:05:19,400 let me take second line. 94 00:05:19,400 --> 00:05:23,100 [no audio] 95 00:05:23,100 --> 00:05:25,800 So initially in case if you want to practice line-by-line, 96 00:05:25,800 --> 00:05:27,600 you can go and open this Python Shell, and 97 00:05:27,600 --> 00:05:29,000 you can practice your code. 98 00:05:29,000 --> 00:05:31,000 [no audio] 99 00:05:31,000 --> 00:05:35,500 Right. So guys you can go with your IDLE, and from there 100 00:05:35,500 --> 00:05:39,200 you can go with 'File', and you can create a 'New File'. 101 00:05:39,600 --> 00:05:43,800 Not this, right. You have this one Python Shell, click here 102 00:05:43,800 --> 00:05:47,800 'New File', and it's like a Notepad, but you can write your 103 00:05:47,800 --> 00:05:50,900 program, you can save it, and you can run simply by pressing 104 00:05:51,000 --> 00:05:55,100 F5, or by clicking on 'Run Module F5', 'Run Module'. 105 00:05:56,300 --> 00:05:59,900 Right. So guys my suggestion is no need to use this one. 106 00:06:00,100 --> 00:06:01,900 Don't use IDLE. If you want you can use it. 107 00:06:01,900 --> 00:06:05,000 But instead of that from your Windows or Linux operating 108 00:06:05,000 --> 00:06:10,300 system command line, right, to create a file just use 'vi' or 109 00:06:10,300 --> 00:06:14,600 'vim' editors, or to enter into your Python Shell just type on your 110 00:06:14,600 --> 00:06:18,200 Windows or Unix like system simply 'python', and you will enter 111 00:06:18,200 --> 00:06:21,600 into your Python Shell, and there you can execute your line by line. 112 00:06:22,600 --> 00:06:25,200 Right. Fine. 113 00:06:26,900 --> 00:06:32,900 So guys, now we are okay with IDLE, vi/vim. Anyway by default 114 00:06:32,900 --> 00:06:35,800 you have Notepad/Notepad++. You can write your 115 00:06:35,800 --> 00:06:38,900 program and save your Python program with an extension of 116 00:06:38,900 --> 00:06:43,400 '.py', and you can run your program by entering into your 117 00:06:43,400 --> 00:06:46,900 command line and by passing 'python ', program name. 118 00:06:47,700 --> 00:06:51,100 Anyway this is not suggested way, right. Then 119 00:06:52,100 --> 00:06:56,200 you can also use PyCharm, right or Spyder or PyDoc, Atom, 120 00:06:56,200 --> 00:06:57,400 and Sublime Text. 121 00:06:57,400 --> 00:06:59,400 [no audio] 122 00:06:59,400 --> 00:07:03,700 Right. So first thing guys, remember that as an Automation Engineer, 123 00:07:03,700 --> 00:07:07,500 you should be good with either 'vi' or 'vim editors 124 00:07:07,700 --> 00:07:09,200 because they are from command line, 125 00:07:10,700 --> 00:07:14,800 right. Then second thing, if you want to use you can use IDLE 126 00:07:14,800 --> 00:07:19,600 as a GUI editor, but instead of that while practicing, because 127 00:07:19,600 --> 00:07:22,300 in your real time you may or may not have this PyCharm or 128 00:07:22,300 --> 00:07:23,900 any one of these GUI editors, 129 00:07:24,500 --> 00:07:28,400 definitely you have Notepad++, right, 130 00:07:29,200 --> 00:07:31,300 but anyway in your real-time, right, 131 00:07:31,800 --> 00:07:39,300 this is the chance to have as an editor in your real time, 132 00:07:39,300 --> 00:07:42,700 and that's why just try to use this 'vi' or 'vim'. In case for 133 00:07:42,700 --> 00:07:47,000 your practice, right, you can use either PyCharm or Sublime 134 00:07:47,000 --> 00:07:50,600 Text. So in the next video, I will show you how to install 135 00:07:50,600 --> 00:07:53,800 either PyCharm or Sublime Text, right? 136 00:07:53,800 --> 00:07:56,900 And for these, guys if you want to use 'vim' 137 00:07:56,900 --> 00:07:59,500 editor on your Windows operating system by default you 138 00:07:59,500 --> 00:08:04,400 don't have, so I am going to post the link to install 'vim' 139 00:08:04,400 --> 00:08:05,500 on your Windows operating system. 140 00:08:05,500 --> 00:08:09,100 You just go through that link so that you can be able to install 141 00:08:09,100 --> 00:08:12,000 your 'vim' on your Windows operating system, right? 142 00:08:12,500 --> 00:08:15,400 Okay, guys, we will see next video how to install PyCharm 143 00:08:15,500 --> 00:08:16,600 or Sublime Text. 144 00:08:17,200 --> 00:08:18,600 Thank you for watching this video. 145 00:08:18,600 --> 00:08:24,900 [no audio]