1 00:00:00,000 --> 00:00:01,500 [no audio] 2 00:00:01,500 --> 00:00:03,300 Friends here we are going to see 3 00:00:03,300 --> 00:00:06,700 how to install Atom Editor, and after 4 00:00:06,700 --> 00:00:10,700 that we are going to see how to use your Atom Editor to run 5 00:00:10,700 --> 00:00:11,700 your Python scripts. 6 00:00:13,100 --> 00:00:16,600 Friends, first of all as an automation engineer, you should be good 7 00:00:17,100 --> 00:00:20,500 with your command line to use your Python. 8 00:00:20,500 --> 00:00:23,300 I mean to write your Python script you have to use 'VI' or 9 00:00:23,300 --> 00:00:25,800 'VIM' editor, and then you have to run your script 10 00:00:25,800 --> 00:00:27,000 from command line itself. 11 00:00:28,300 --> 00:00:32,400 But anyway, you have some GUI editors to write your Python scripts, 12 00:00:32,400 --> 00:00:33,900 and to run your Python scripts. 13 00:00:35,000 --> 00:00:38,900 Right. See the advantage with any GUI editor is, 14 00:00:40,600 --> 00:00:45,600 you can write your code, and then you can run such that the 15 00:00:45,600 --> 00:00:48,400 code and the output you can see in a single window. 16 00:00:48,600 --> 00:00:53,000 That is the advantage with your GUI editors. That's it. 17 00:00:54,200 --> 00:00:57,400 Fine. Now, here we are going to see how to install your 18 00:00:57,400 --> 00:00:59,300 Atom editor first. Guys 19 00:00:59,300 --> 00:01:03,000 nothing is there. It's very simple. Just open your browser, 20 00:01:03,000 --> 00:01:06,700 and then enter 'atom.io', then enter, 21 00:01:06,700 --> 00:01:08,700 [no audio] 22 00:01:08,700 --> 00:01:12,200 then directly you are going to redirect into a page where 23 00:01:12,200 --> 00:01:16,600 you can see 'Download' option for your Windows 64-bit, or the 24 00:01:16,600 --> 00:01:18,300 64-bit Windows 7 or later. 25 00:01:18,800 --> 00:01:20,800 Just click on this. Right. 26 00:01:21,300 --> 00:01:24,300 So to download this it will take some time, and you are going 27 00:01:24,300 --> 00:01:26,300 to download '.exe' file. 28 00:01:26,600 --> 00:01:28,200 So first you have to save this file. 29 00:01:28,900 --> 00:01:32,000 I'm going to cancel it because already I downloaded that file. 30 00:01:32,700 --> 00:01:33,900 You just download this. 31 00:01:35,200 --> 00:01:39,100 Then let me open my 'Download' folder. There 32 00:01:39,100 --> 00:01:42,700 I have already my 'AtomSetup-x64', 64 33 00:01:43,900 --> 00:01:46,000 bit server, right. Fine. 34 00:01:46,900 --> 00:01:50,600 So guys, now what you have to do is just double click on this, 35 00:01:51,500 --> 00:01:56,300 right, so it is going to set up, or it is going to install 36 00:01:56,300 --> 00:02:00,500 this Atom on your server, on your PC, right. 37 00:02:00,500 --> 00:02:01,500 It will take some time. 38 00:02:01,700 --> 00:02:06,200 You have to wait some time to complete this set up, right. 39 00:02:06,400 --> 00:02:09,500 So up to that I am going to mute, once it is done, 40 00:02:09,500 --> 00:02:12,900 then we'll go with the further steps. Please wait. And meanwhile 41 00:02:13,000 --> 00:02:18,400 you just try to do your installation simultaneously on your server. 42 00:02:19,800 --> 00:02:20,800 Right. Fine. 43 00:02:20,800 --> 00:02:27,300 [no audio] 44 00:02:27,300 --> 00:02:31,800 So it will take some time to do setup, to install your Atom. 45 00:02:32,700 --> 00:02:33,700 You have to wait. 46 00:02:34,200 --> 00:02:39,200 It's starting. Right. The progress you can see on your taskbar, right. 47 00:02:40,800 --> 00:02:42,300 "Atom is being installed. 48 00:02:42,300 --> 00:02:43,900 It will launch once it is done". 49 00:02:44,100 --> 00:02:47,600 So once if your Atom is installed, automatically it will 50 00:02:47,600 --> 00:02:51,900 launch that Atom editor, right. Fine. 51 00:02:53,100 --> 00:02:57,000 So guys, I'm going to mute. Just observe that. It will take some time. 52 00:02:57,000 --> 00:03:12,900 [no audio] 53 00:03:12,900 --> 00:03:14,600 It will take almost two minutes guys. 54 00:03:15,700 --> 00:03:17,000 You have to wait for that. 55 00:03:17,000 --> 00:03:23,300 [no audio] 56 00:03:23,300 --> 00:03:26,800 So meanwhile you just download your Atom from your 57 00:03:27,800 --> 00:03:29,600 'atom.io' 58 00:03:29,600 --> 00:03:37,500 website, then try to install. Right. See guys to install your Atom, 59 00:03:37,700 --> 00:03:39,200 right, just I'm going to give steps. 60 00:03:39,300 --> 00:03:40,800 Anyway, the process is going on. 61 00:03:40,800 --> 00:03:43,700 [no audio] 62 00:03:43,700 --> 00:03:46,500 First open your browser, right? 63 00:03:46,500 --> 00:03:50,200 [no audio] 64 00:03:50,200 --> 00:03:56,600 Then enter URL, that is 'atom.io', then there you will 65 00:03:56,600 --> 00:03:58,000 have a 'Download' option, 66 00:03:58,000 --> 00:04:00,000 [no audio] 67 00:04:00,000 --> 00:04:01,000 just download that, 68 00:04:02,500 --> 00:04:06,200 download Atom, right? It is a 69 00:04:06,250 --> 00:04:08,200 [no audio] 70 00:04:08,200 --> 00:04:10,000 '.exe' set up. 71 00:04:10,600 --> 00:04:15,600 Once it is downloaded, right, then double click on that, 72 00:04:15,600 --> 00:04:19,000 [no audio] 73 00:04:19,000 --> 00:04:20,100 and wait some time. 74 00:04:21,800 --> 00:04:24,899 Because it will take some time to do that setup, right? 75 00:04:26,399 --> 00:04:29,800 Let me see the progress. Still it is taking some time. 76 00:04:29,800 --> 00:04:33,200 [no audio] 77 00:04:33,200 --> 00:04:36,400 Friends, you have a lot of GUI editors like 78 00:04:36,400 --> 00:04:38,900 Sublime Text, PyCharm, Atom, 79 00:04:40,300 --> 00:04:42,400 right, you can use any one of the editor. 80 00:04:43,800 --> 00:04:47,700 So most of the cases I will use Sublime Text, but it is a 81 00:04:47,700 --> 00:04:52,000 licensed one but Atom is the open source, you can directly 82 00:04:52,000 --> 00:04:54,900 download and install. But whereas in Sublime you can download 83 00:04:54,900 --> 00:04:59,100 and install, but you need a license to activate full version 84 00:04:59,100 --> 00:05:00,300 of your Sublime text. 85 00:05:00,400 --> 00:05:02,600 That's why please don't go with Sublime Text, but of course, 86 00:05:02,600 --> 00:05:05,900 I am going to use that. But please try to do, please try to 87 00:05:05,900 --> 00:05:06,900 use Atom 88 00:05:07,000 --> 00:05:08,800 in case if you want GUI editors. 89 00:05:10,200 --> 00:05:13,100 Of course, you're also having PyCharm as well. That is also good one. 90 00:05:13,100 --> 00:05:14,300 You can use pycharm as well. 91 00:05:15,300 --> 00:05:16,500 Right. Fine. 92 00:05:17,000 --> 00:05:18,100 Your installation is done. 93 00:05:18,100 --> 00:05:20,700 Now it is going to open your Atom editor. 94 00:05:20,700 --> 00:05:23,100 It will automatically open, you just wait some time. 95 00:05:23,100 --> 00:05:31,100 [no audio] 96 00:05:31,100 --> 00:05:32,100 That's it. 97 00:05:32,100 --> 00:05:34,100 [no audio] 98 00:05:34,100 --> 00:05:35,800 Okay. Fine. 99 00:05:36,000 --> 00:05:40,600 See guys, once it is open, right, go to 'File', 100 00:05:40,600 --> 00:05:43,100 [no audio] 101 00:05:43,100 --> 00:05:44,600 go to your 'File', 102 00:05:46,100 --> 00:05:50,000 and here we have 'Settings'. Where it is? 'Settings', 103 00:05:51,300 --> 00:05:56,200 now in 'Settings' you have somewhere 'Themes', suppose if I select 104 00:05:56,200 --> 00:05:59,400 a 'Theme', see that you have different options 'UI Theme', that 105 00:05:59,400 --> 00:06:02,200 means this entire Window theme, you can change it for your 106 00:06:02,200 --> 00:06:03,500 different themes. Suppose 107 00:06:03,500 --> 00:06:05,500 I am going to take 'One Light', 108 00:06:10,100 --> 00:06:14,100 see that, but I don't want to use this theme. Just use default 109 00:06:14,100 --> 00:06:15,100 theme, that's a good one. 110 00:06:16,500 --> 00:06:18,000 But if you want you can take anything. 111 00:06:18,000 --> 00:06:22,100 [no audio] 112 00:06:22,100 --> 00:06:23,800 'Atom Dark'. That's it. 113 00:06:24,200 --> 00:06:31,600 And then let me close all of these editors as of now, then 114 00:06:31,900 --> 00:06:36,900 let me open 'New File', or you can directly, if you click here, yeah, 115 00:06:38,000 --> 00:06:39,600 it is opening, right? 116 00:06:39,800 --> 00:06:42,700 So let me write some simple Python script, just simply I'm 117 00:06:42,700 --> 00:06:44,000 writing 'print( 118 00:06:44,000 --> 00:06:46,800 [no audio] 119 00:06:46,800 --> 00:06:50,900 "Welcome to Atom GUI editor")' 120 00:06:52,400 --> 00:06:56,900 Right. And then save. While saving, please, please mention 121 00:06:56,900 --> 00:06:58,400 '.py' extension. 122 00:06:59,200 --> 00:07:03,800 So I am writing suppose 'demo.py'. Sorry, it is there. No problem. 123 00:07:03,800 --> 00:07:06,500 I want to replace that. Fine. Now see that you are getting 124 00:07:06,500 --> 00:07:08,900 some color for your Python script. 125 00:07:09,800 --> 00:07:14,300 Now, if you want to change this editor theme, nothing is there. Again 126 00:07:14,300 --> 00:07:20,200 just go with your 'File', then 'Settings', and then 'Themes'. 127 00:07:20,200 --> 00:07:21,600 So here you have 'Syntax Theme'. 128 00:07:21,600 --> 00:07:23,400 You can select here different theme. 129 00:07:24,000 --> 00:07:28,900 Let me apply 'Base64 Tomorrow Light', right. Now open your file. 130 00:07:28,900 --> 00:07:31,100 See now you have a different theme here, 131 00:07:31,100 --> 00:07:33,000 [no audio] 132 00:07:33,000 --> 00:07:36,700 but if you want to use default you can use it, or if you want 133 00:07:36,700 --> 00:07:38,000 to change any other one, 134 00:07:38,000 --> 00:07:40,600 let me take 'Settings', 135 00:07:42,100 --> 00:07:44,400 so I'm going to take suppose this one, 136 00:07:44,400 --> 00:07:46,500 [no audio] 137 00:07:46,500 --> 00:07:48,600 now see here. That's it. 138 00:07:49,500 --> 00:07:53,400 Okay. Fine. Guys, after saving your code 139 00:07:53,400 --> 00:07:58,800 if you want to run your Python script just press 'Ctrl + Shift + B', 140 00:07:59,800 --> 00:08:01,400 but as of now it is not running. 141 00:08:01,900 --> 00:08:07,300 The reason is automatically your Atom editor, right, 142 00:08:07,500 --> 00:08:11,500 yeah, now you got it, "Welcome to Atom GUI editor". 143 00:08:11,600 --> 00:08:15,200 So you got this because already I have previous configuration 144 00:08:15,200 --> 00:08:17,200 details, that's why you are getting this. Let me show you 145 00:08:17,200 --> 00:08:20,200 that, 'Settings'. 'Settings', 146 00:08:21,700 --> 00:08:24,400 then go with the 'Install', right? 147 00:08:24,500 --> 00:08:27,600 So here search a package called 'script'. 148 00:08:27,600 --> 00:08:32,100 [no audio] 149 00:08:32,100 --> 00:08:36,400 See that. Already it was there with my host, that's why automatically 150 00:08:36,400 --> 00:08:41,000 your Atom fetched that. So if you search with 'script', you will 151 00:08:41,000 --> 00:08:44,700 get this script, "Run code in Atom!", and then you will see 152 00:08:44,700 --> 00:08:48,100 here option like this one, 'Install', right. 153 00:08:48,100 --> 00:08:51,400 But I already installed that, that's why it is able to show 154 00:08:51,400 --> 00:08:57,000 that - 'Settings', 'Uninstall', and 'Disable'. Right. Suppose if I disable 155 00:08:57,000 --> 00:09:01,000 this, that means assume that there is no 'script' package with 156 00:09:01,000 --> 00:09:04,200 my Atom editor right. Now, 157 00:09:04,200 --> 00:09:08,700 if I try to run, see that, you won't get any output now. Your 158 00:09:08,700 --> 00:09:10,000 script can't run. 159 00:09:10,000 --> 00:09:11,800 [no audio] 160 00:09:11,800 --> 00:09:15,700 So not only for your Python, if you want to run any type of 161 00:09:16,000 --> 00:09:21,300 script which was supported by your Atom, to run that script, 162 00:09:21,300 --> 00:09:25,300 first of all you need to install a package called 'script'. 163 00:09:26,000 --> 00:09:29,300 So just select 'Install', and then come here 164 00:09:29,300 --> 00:09:31,600 search for a 'script' package. 165 00:09:33,100 --> 00:09:36,200 Right. See already it was there with my host, 166 00:09:36,200 --> 00:09:38,600 that's why I just I'm enabling, 'Enable'. 167 00:09:38,700 --> 00:09:41,400 If it is not there, you'll get option like 'Install'. You have to install it. 168 00:09:41,400 --> 00:09:43,900 It will take some time guys. Nearly two to three minutes you 169 00:09:43,900 --> 00:09:46,400 will take to install your 'script' package. 170 00:09:46,800 --> 00:09:50,500 So what is the use of this package means, this package will 171 00:09:50,500 --> 00:09:54,300 automatically identify the Python version which is there 172 00:09:54,300 --> 00:09:57,600 on your operating system, whatever the Python version you 173 00:09:57,600 --> 00:09:59,200 install on your operating system, 174 00:09:59,700 --> 00:10:04,500 that Python will be set for your Atom editor to run your 175 00:10:04,500 --> 00:10:05,500 Python scripts. 176 00:10:07,200 --> 00:10:11,300 Your Atom editor is going to identify your Python based on 177 00:10:11,300 --> 00:10:12,800 your environment variables. 178 00:10:12,800 --> 00:10:18,900 If you remember while installing our Python, we set some environment 179 00:10:18,900 --> 00:10:24,600 variable or path for your PC by selecting 'Properties', 'Advanced 180 00:10:24,600 --> 00:10:27,700 System Settings', then in any 'Environment Variables' we have 181 00:10:27,700 --> 00:10:33,200 a 'Path', edit it. See that, Python 37 version was selected for 182 00:10:33,200 --> 00:10:36,400 your operating system. The same Python will be used 183 00:10:36,500 --> 00:10:39,700 by your Atom editor with the help of 'script' package. 184 00:10:41,000 --> 00:10:44,900 Nothing is there guys. Once if you install your Atom, simply go to 'File', 185 00:10:45,000 --> 00:10:50,000 then 'Settings', and then go to 'Install', and then search a package 186 00:10:50,000 --> 00:10:55,200 called 'script', and then it will display a 'script' package, something 187 00:10:55,200 --> 00:10:58,900 like this - 'script', some version, 'Run code in Atom!', 188 00:10:58,900 --> 00:11:01,500 just 'Install' that. Right. 189 00:11:02,800 --> 00:11:07,300 So after that, just select your Python script by clicking 190 00:11:07,300 --> 00:11:12,200 on your editor, then press on your keyboard 'Ctrl' + 'Shift', and then 'B'. 191 00:11:13,000 --> 00:11:15,100 Now it is going to run. See the output in the below. 192 00:11:15,400 --> 00:11:16,800 You're getting your output here. 193 00:11:17,600 --> 00:11:22,500 Right. So what is the Python version this Atom editor is using? So 194 00:11:22,500 --> 00:11:24,600 as of now, I don't know about modules, right? 195 00:11:24,600 --> 00:11:27,800 There is a module called 'sys' with your Python, using that 196 00:11:27,800 --> 00:11:31,100 you are able to find out the version of your Python which is 197 00:11:31,100 --> 00:11:32,400 running your python code. 198 00:11:32,400 --> 00:11:34,500 [no audio] 199 00:11:34,500 --> 00:11:36,900 Right. Let me run it, 'Ctrl + Shift + B' 200 00:11:37,900 --> 00:11:43,200 See the output, 3.7.0. In case if you modify, if you modify 201 00:11:43,200 --> 00:11:48,000 your 'PATH' to some other version of your Python here, automatically 202 00:11:48,000 --> 00:11:52,000 that Python will be used by your Atom editor. That's it. 203 00:11:53,400 --> 00:11:54,800 Right. Fine. 204 00:11:55,400 --> 00:11:58,500 So after installing your 'script', after testing your Python 205 00:11:58,500 --> 00:12:01,200 script whether it is running successfully or not, just close it. 206 00:12:01,200 --> 00:12:03,800 [no audio] 207 00:12:03,800 --> 00:12:05,000 Right. See guys, 208 00:12:05,000 --> 00:12:10,600 once if you install your Python you may get some shortcut for 209 00:12:10,600 --> 00:12:12,800 your Atom editor on your Desktop, 210 00:12:12,900 --> 00:12:15,500 if it is not, just click your 'Start', 211 00:12:16,900 --> 00:12:19,900 so see here, you will see some 'Atom' editor, 212 00:12:20,200 --> 00:12:21,100 just click on that, 213 00:12:22,700 --> 00:12:26,500 then it will open your Atom editor, right? 214 00:12:26,500 --> 00:12:29,000 You're going to open your Atom editor. 215 00:12:29,200 --> 00:12:30,300 Yes, it's opening. 216 00:12:30,300 --> 00:12:32,400 [no audio] 217 00:12:32,400 --> 00:12:36,400 Right. So suppose if you've already some Python scripts, and if you 218 00:12:36,400 --> 00:12:40,500 want to run those Python scripts using your Atom editor, you 219 00:12:40,500 --> 00:12:42,100 have an option called 'File', 220 00:12:42,300 --> 00:12:43,600 just select your folder, 221 00:12:45,200 --> 00:12:49,000 'Open Folder', select that. In which location you have your Python 222 00:12:49,000 --> 00:12:53,000 scripts? Let me go with one of the location. 223 00:12:53,000 --> 00:12:57,100 [no audio] 224 00:12:57,100 --> 00:12:59,800 Sorry, let me select. 225 00:12:59,800 --> 00:13:08,100 [no audio] 226 00:13:08,100 --> 00:13:10,100 Let me select 'Day 3'. That's it. 227 00:13:10,600 --> 00:13:13,400 Now inside that in case if you have any Python scripts, all those 228 00:13:13,400 --> 00:13:16,600 scripts are going to open here. Now directly what you will 229 00:13:16,600 --> 00:13:20,700 do? See that let me select some of the Python script called 230 00:13:20,700 --> 00:13:23,600 suppose this one, just double-click on that, 231 00:13:23,600 --> 00:13:26,700 you're going to get your python script here, then click there, 232 00:13:26,700 --> 00:13:31,500 and then 'Ctrl + Shift + B'. Right. Now you are going to get 233 00:13:31,500 --> 00:13:32,700 your output here. 234 00:13:32,700 --> 00:13:35,400 [no audio] 235 00:13:35,400 --> 00:13:36,400 See that, 236 00:13:37,800 --> 00:13:39,100 'Invalid syntax'. 237 00:13:39,100 --> 00:13:42,500 Yeah, maybe this is Python 3, right? 238 00:13:42,500 --> 00:13:45,600 I am using maybe Python 3, 13th line, yeah. 239 00:13:46,300 --> 00:13:51,700 So here I need a parentheses here. Save it and then run it, 240 00:13:51,800 --> 00:13:53,100 'Ctrl + Shift + B' 241 00:13:54,000 --> 00:13:57,500 Yes, you got your output, right? That's it. 242 00:13:58,500 --> 00:14:01,200 So guys after installing your Atom editor 243 00:14:01,400 --> 00:14:04,200 what is your next step is, if you want to change some things 244 00:14:04,200 --> 00:14:06,400 you can change it, but no need of that. Directly 245 00:14:06,400 --> 00:14:13,100 you can use default themes, then install 'script' package 246 00:14:14,700 --> 00:14:16,400 on your Atom. 247 00:14:16,400 --> 00:14:17,600 So how to install this? 248 00:14:17,800 --> 00:14:21,700 If you install this, then only your host Python software will 249 00:14:21,700 --> 00:14:25,500 be identified by your Atom, and the code in your Atom will 250 00:14:25,500 --> 00:14:29,700 be run by that Python software in your Atom editor. 251 00:14:30,400 --> 00:14:33,900 So to install 'script' package, right, package name is simply 252 00:14:33,900 --> 00:14:36,800 'script' guys, what you have to do is, 253 00:14:38,200 --> 00:14:39,200 go to 254 00:14:40,800 --> 00:14:43,500 your, see that, 'File', 255 00:14:43,500 --> 00:14:46,300 [no audio] 256 00:14:46,300 --> 00:14:47,800 then select 'Settings', 257 00:14:48,900 --> 00:14:51,500 then in that select 'Install', then you 258 00:14:51,500 --> 00:14:58,200 will get a search bar, so search with 'script', then you will get 259 00:14:58,400 --> 00:14:59,700 a 'script' package. 260 00:14:59,700 --> 00:15:01,900 [no audio] 261 00:15:01,900 --> 00:15:06,200 So there you have an option called 'Install', just install it. 262 00:15:07,200 --> 00:15:08,200 That's it. 263 00:15:08,700 --> 00:15:12,600 Then after that you just to close your Atom, and then reopen 264 00:15:12,900 --> 00:15:17,000 right? So one more thing, once if you install your Atom editor, 265 00:15:17,300 --> 00:15:21,600 right, automatically you may get shortcut of your Atom on your 266 00:15:21,700 --> 00:15:24,100 Desktop. If not, no problem, 267 00:15:24,100 --> 00:15:27,600 just select your 'Start', and then click here so that it will 268 00:15:27,600 --> 00:15:29,800 open your Atom editor. That's it. 269 00:15:29,800 --> 00:15:32,000 [no audio] 270 00:15:32,000 --> 00:15:33,100 So guys, going forward 271 00:15:33,200 --> 00:15:36,000 I may use most of the cases Sublime Text because for 272 00:15:36,000 --> 00:15:38,000 presentation purpose that is good. 273 00:15:38,800 --> 00:15:42,300 Right. But you can practice your course using your Atom. 274 00:15:43,000 --> 00:15:47,600 Right. And also try to write the code using 'VI', or 275 00:15:47,600 --> 00:15:50,700 'VIM' editor, and try to run your code from command line as well. 276 00:15:52,300 --> 00:15:54,600 Right. If you are looking for automation engineer, that is the 277 00:15:54,600 --> 00:15:55,600 best option actually. 278 00:15:56,900 --> 00:15:58,800 For application development, something like that, 279 00:15:58,900 --> 00:16:02,100 actually this GUI editors are good because for application 280 00:16:02,100 --> 00:16:04,500 development, you know, you will have some number of folders, 281 00:16:04,600 --> 00:16:07,400 some number of applications, each application will have some 282 00:16:07,400 --> 00:16:10,500 URL, some use, some DV models, 283 00:16:10,600 --> 00:16:11,900 that's why different files you have. 284 00:16:12,100 --> 00:16:15,500 So maybe you're going to work at different files at a different 285 00:16:15,500 --> 00:16:17,600 times, that's why it is very easy to select here 286 00:16:17,600 --> 00:16:20,000 your required files with GUI editors. 287 00:16:21,200 --> 00:16:26,300 Right. So anyway guys you have number of editors, just select based 288 00:16:26,300 --> 00:16:30,900 on your choice, go with your required or your favorite editor, 289 00:16:30,900 --> 00:16:34,100 and try to practice your Python scripts, okay. 290 00:16:34,900 --> 00:16:36,800 Okay guys, thank you for watching this video. 291 00:16:36,800 --> 00:16:42,645 [no audio]