1 00:00:05,770 --> 00:00:12,280 Everyone so in this video we are going to learn about the basic thing to that how we can create a window. 2 00:00:12,320 --> 00:00:17,490 So first of all if you go to the north and open the introduction notes in that one. 3 00:00:17,510 --> 00:00:18,880 This one is for a little idea. 4 00:00:18,920 --> 00:00:23,600 You will find that the Python provides various options for developing graphical interfaces. 5 00:00:23,600 --> 00:00:29,090 These are the four available options and there are many more but here only four are listed out of each 6 00:00:29,090 --> 00:00:31,010 dating to day in build one. 7 00:00:31,130 --> 00:00:32,800 And most of the users pay for this one. 8 00:00:33,440 --> 00:00:38,310 And then we have these three also these are something like we have met broadly as. 9 00:00:38,330 --> 00:00:41,800 Then we have seaborne brutal by for a better interface. 10 00:00:41,830 --> 00:00:44,110 You can also pay for these and learn about Declan. 11 00:00:44,780 --> 00:00:50,920 But our subject is only dating to so anything to creating a new application. 12 00:00:50,930 --> 00:00:52,810 It's only of three steps. 13 00:00:52,880 --> 00:00:59,240 First of all creating the window that is like you can see this one is a window completely then adding 14 00:00:59,240 --> 00:01:00,680 some widgets. 15 00:01:00,830 --> 00:01:05,610 This the second step which I think you understand that like this both turns out. 16 00:01:05,600 --> 00:01:10,810 Visits the scroll bar is a visit and all these things. 17 00:01:10,910 --> 00:01:12,050 The text here return. 18 00:01:12,050 --> 00:01:14,160 This is also a visit. 19 00:01:14,450 --> 00:01:17,780 And now here I have listed all digits. 20 00:01:18,230 --> 00:01:23,210 One more thing The third step that I have told you to like creating the window then adding the widget. 21 00:01:23,240 --> 00:01:29,930 Third one is the adding the main functions that what that perform like on clicking any of these files 22 00:01:30,530 --> 00:01:34,330 here I get the option to write anything. 23 00:01:34,410 --> 00:01:35,440 Over it. 24 00:01:35,600 --> 00:01:37,870 So here we have fewer widgets. 25 00:01:37,940 --> 00:01:43,940 I have categorized 15 types but these are 19 because some are like each other. 26 00:01:43,960 --> 00:01:49,630 And the reason of the first one is the button a simple button then you can see him. 27 00:01:49,640 --> 00:01:51,440 This one is known as a button. 28 00:01:51,440 --> 00:01:54,050 Then we have a canvas can we do something. 29 00:01:54,080 --> 00:01:56,350 You can create any figure there. 30 00:01:56,390 --> 00:02:01,830 Then these guys into a button check button very you can just make this one tick. 31 00:02:02,020 --> 00:02:08,210 Then entries in which you can fill the data frames that will divide this section and this thing is the 32 00:02:08,210 --> 00:02:11,800 main window in which you have these clauses at precise. 33 00:02:12,050 --> 00:02:16,210 Then here the label list books. 34 00:02:16,220 --> 00:02:24,700 Then we have menu button and then we have a complete menu the messages the radio button like you can 35 00:02:24,700 --> 00:02:29,260 select only one at a time of these the scale scroll bar. 36 00:02:29,500 --> 00:02:37,210 This one as I have shown him the text in this you can add Dex top level like the popup windows spin 37 00:02:37,210 --> 00:02:45,210 box in which you can up and down the values then we have been with nose level frames and message books. 38 00:02:45,250 --> 00:02:47,340 So these are a few of these listed here. 39 00:02:47,590 --> 00:02:49,870 After the mention of attributes also. 40 00:02:50,320 --> 00:02:52,800 But we will talk about that later. 41 00:02:52,810 --> 00:02:56,540 So this is to show you that what actually these things are. 42 00:02:56,560 --> 00:03:02,290 I hope you got a little idea of these things right now but when we consider these one by one we will 43 00:03:03,520 --> 00:03:07,180 try to focus on many of these and cover a lot. 44 00:03:07,180 --> 00:03:12,430 The one that we left here you can learn about that one separately. 45 00:03:12,480 --> 00:03:18,940 So now let's begin first of all with creating a window that how we can create something. 46 00:03:19,000 --> 00:03:22,930 Let me go that one and one more thing again. 47 00:03:22,930 --> 00:03:29,420 You can before any of the item like even if you choose only determiner You can also do in that one. 48 00:03:29,430 --> 00:03:40,000 I will show you that one later must first go with the item there we have the item and there we go. 49 00:03:41,590 --> 00:03:47,840 So for trying to create a new file and named discern as. 50 00:03:47,890 --> 00:03:50,700 Don't be late decay. 51 00:03:50,710 --> 00:04:00,610 Don't be like you save no if you even notice on this one. 52 00:04:00,660 --> 00:04:03,810 This one is a window inside of his days. 53 00:04:03,810 --> 00:04:09,960 There are some comments now if you look at this one then it seems that it's a little harder to create 54 00:04:09,990 --> 00:04:10,750 this one. 55 00:04:10,750 --> 00:04:16,710 Like we need to have some dimensions here how wide and how long this one is. 56 00:04:16,710 --> 00:04:22,610 We have these three symbols that is cutting minimize and expand and we have some particular name here. 57 00:04:22,630 --> 00:04:24,940 Carlos and how we can create distance. 58 00:04:25,950 --> 00:04:32,570 So if I literally say you this one is very easy you will see in a while like with a stick wire four 59 00:04:32,580 --> 00:04:38,640 lines of commands for creating these kinds of windows even just to if he are working perfecting your 60 00:04:38,640 --> 00:04:39,140 computer. 61 00:04:40,020 --> 00:04:48,030 So first of all we need to import distinct as the days the day by 10 but we need to import that. 62 00:04:48,600 --> 00:04:54,900 So import thing to make sure all the things are in small case let us know. 63 00:04:56,130 --> 00:05:03,960 And at the step you need to do here is from you have to do this one again but in a different way. 64 00:05:04,510 --> 00:05:09,470 Think the import start here is timing is everything. 65 00:05:09,480 --> 00:05:14,100 So generally I have again import completing to add these two lines. 66 00:05:14,100 --> 00:05:16,630 And then if you want to create this window. 67 00:05:16,650 --> 00:05:18,510 So first of all we need to have a window. 68 00:05:18,510 --> 00:05:20,730 So I have a variable denoting the window. 69 00:05:21,570 --> 00:05:28,230 And here you just need to do capital T and k if you are using Python 2 then this one is a small tea 70 00:05:28,230 --> 00:05:30,370 and smoking tenses. 71 00:05:30,390 --> 00:05:38,340 Now you have in those created then you need to add another line that is the again same variable note 72 00:05:38,460 --> 00:05:39,910 main loop. 73 00:05:40,110 --> 00:05:42,060 So this one is just like the estimate. 74 00:05:42,060 --> 00:05:45,330 Anything written in between these two will work in that window. 75 00:05:45,930 --> 00:05:51,030 So if you want to add any functionality to that fund you need to add in between these. 76 00:05:51,210 --> 00:05:57,740 So if you save this one commanders and if I run this one first of all today Friday stop. 77 00:05:58,130 --> 00:06:03,540 Now if I run that file Python three decade don't be Y. 78 00:06:03,870 --> 00:06:04,930 David go with David. 79 00:06:05,240 --> 00:06:10,130 So if you notice this one this is very easy to create just four lines of code here. 80 00:06:10,140 --> 00:06:15,660 These four lines and we have these options available with that one this all the things are done by the 81 00:06:15,660 --> 00:06:16,750 printer. 82 00:06:16,860 --> 00:06:22,890 Having this white background color like this one is also a task how divide colors do noting here while 83 00:06:22,890 --> 00:06:25,110 all the things in the background are black right now. 84 00:06:25,800 --> 00:06:33,440 So that's what all the things think to do adding this about thing their name main filing. 85 00:06:33,460 --> 00:06:39,340 Now if I got that one and first of all let me move to determine. 86 00:06:39,890 --> 00:06:43,570 I have shown you this one and this is all about creating a window. 87 00:06:43,820 --> 00:06:52,000 One more thing you can just create the dimensions of that one like add a variable here when DOD and 88 00:06:52,030 --> 00:06:59,330 add geometry because geometric efforts do like they hide traits and all these things and in that one 89 00:06:59,740 --> 00:07:08,300 would cause positive dimensions you need like if I pass a hundred X hundred this one is X not a star 90 00:07:08,300 --> 00:07:16,190 so make sure you're using x commanders and if you run that well right now you'll get this one in two. 91 00:07:16,820 --> 00:07:21,440 If I make this one like 400 into 400 92 00:07:24,050 --> 00:07:28,910 one more thing until you cancel that one you will not find income come on Terminal A a new option to 93 00:07:28,910 --> 00:07:35,790 right come on because the application is still going on here we have five hundred into five hundred. 94 00:07:35,800 --> 00:07:40,080 So this is about the creating we know now one more thing. 95 00:07:41,010 --> 00:07:43,330 You can just directly do that one here. 96 00:07:43,380 --> 00:07:50,190 Now if I run a python shell Python 3 if you want to create a file you can also create file and then 97 00:07:50,190 --> 00:08:00,480 write the thinks import thing done then from doing the import stuff. 98 00:08:00,480 --> 00:08:10,020 Now as soon as you write this one Becky you will get your window here this one and then you can add 99 00:08:10,170 --> 00:08:21,330 whatever to come on in that when you need like windowed geometry and had I lost that one let me write 100 00:08:21,350 --> 00:08:34,270 that one in windowed geometry and then we have this one say 400 x 400 hit enter the expand. 101 00:08:34,390 --> 00:08:38,110 So as you make changes here you will get the changes there. 102 00:08:38,830 --> 00:08:45,820 So you can also create this one in terminal because that one is more easy than Adam right now and even 103 00:08:45,820 --> 00:08:52,090 you can therefore the Jupiter notebooks if I have a notebook here that it's run 104 00:08:54,810 --> 00:08:55,250 will 105 00:08:59,260 --> 00:09:00,830 a new python file. 106 00:09:03,440 --> 00:09:05,300 And this one. 107 00:09:05,420 --> 00:09:15,490 If you do import data then im from think the these two lines do not take much time. 108 00:09:15,490 --> 00:09:18,520 So make this one a habit to importing these. 109 00:09:18,520 --> 00:09:22,300 This one also I will tell you here that why these two lengths. 110 00:09:22,660 --> 00:09:31,990 So from trying to import star shifter done and then we have Vin is equal to taking Prentiss shift return 111 00:09:32,620 --> 00:09:35,860 and there we have this know that right now 112 00:09:38,650 --> 00:09:40,660 so right now the file is trending. 113 00:09:40,660 --> 00:09:42,940 Actually you will get a window pop up there. 114 00:09:44,710 --> 00:09:45,530 No way. 115 00:09:45,640 --> 00:09:53,250 All these things like these two commands they're linked to and from think tank or stuff. 116 00:09:53,580 --> 00:09:54,870 Let me show you that one also. 117 00:09:55,500 --> 00:09:59,820 So an internal shell here. 118 00:10:00,540 --> 00:10:08,070 If you do something like import only thing though then not in every case you human get output but in 119 00:10:08,070 --> 00:10:16,700 some cases if you do win is equal to decay fences you will get added that is named decays not defined. 120 00:10:16,950 --> 00:10:21,300 But I have actually imported that one but still T.K. is not defined. 121 00:10:21,610 --> 00:10:30,480 So in that case you need to add that one from thing to import star and then when you run that one win 122 00:10:30,510 --> 00:10:39,400 equal to taking hatred then you will get the window and let me know move to that one again. 123 00:10:41,530 --> 00:10:50,740 Exit a new tension that is Python 3 and if you do only from Star import into. 124 00:10:50,830 --> 00:10:52,850 Then again not in every so. 125 00:10:53,850 --> 00:11:03,310 I have tried to oppose it coming from thing to import star so again not in every case but in most of 126 00:11:03,310 --> 00:11:09,360 the cases when you do that one and try to make a new window hit return. 127 00:11:09,450 --> 00:11:16,180 Here again the output but it isn't possible you will not get there so it completely depends that what 128 00:11:16,180 --> 00:11:17,590 kind of computer you have. 129 00:11:18,460 --> 00:11:23,380 So they are just two lines so don't be lazy about that one. 130 00:11:23,440 --> 00:11:28,170 Just add all the two lines then you will not get added in any case. 131 00:11:28,390 --> 00:11:30,210 So this is all about creating a window. 132 00:11:30,250 --> 00:11:33,430 We will continue with the widgets from the next video. 133 00:11:33,430 --> 00:11:34,320 Thanks for watching. 134 00:11:34,330 --> 00:11:35,170 Sue them.