1
00:00:01,570 --> 00:00:06,400
OK, so we've installed everything we need to install now we can start to create our first project,

2
00:00:06,400 --> 00:00:13,240
so open up your sublime text editor and you should see a blank sort of screen here and go to file and

3
00:00:13,240 --> 00:00:18,780
save as and we want to save this to that directory we just created in the last video.

4
00:00:18,790 --> 00:00:25,030
So kind of navigate, maybe you might want to click on your this PC and then your C drive and then just

5
00:00:25,030 --> 00:00:27,070
find that guv's directory.

6
00:00:27,990 --> 00:00:32,730
And there it is and double click on it and you see there's our virt directory so we know we're in the

7
00:00:32,730 --> 00:00:35,610
right place and we could just now name this anything we want.

8
00:00:35,610 --> 00:00:41,690
Let's name this hello, Dot Pi and all python files and Dot Pi.

9
00:00:41,700 --> 00:00:43,620
So you always want to save it as dot pi.

10
00:00:44,100 --> 00:00:47,960
So you can see now says hello DCPI and we can now right some code.

11
00:00:48,150 --> 00:00:53,250
So in order to create Kintyre programs and I should mention, I call it Kintyre, I know it's spelled

12
00:00:53,260 --> 00:00:57,660
T Kintore, I just don't like S. Kintner and a lot of people just call it Kintyre.

13
00:00:57,660 --> 00:01:00,360
So I, I pretend that the T is silent.

14
00:01:00,360 --> 00:01:04,350
Nobody really knows how you're supposed to pronounce, as I pronounce it, Kintner.

15
00:01:04,590 --> 00:01:10,470
So to create Kinta programs, the only thing you really need to do is import Quinter into your program.

16
00:01:10,620 --> 00:01:15,690
Now Kintyre comes with Python already, so we don't have to install anything on the back end to use

17
00:01:15,690 --> 00:01:16,050
Cantare.

18
00:01:16,050 --> 00:01:19,350
We just need to tell our program that we're going to be using it.

19
00:01:19,350 --> 00:01:27,930
So to do that we just go from tenter import and then the star and the star is usually shift an eight

20
00:01:27,930 --> 00:01:29,670
on a keyboard, the the number eight.

21
00:01:30,510 --> 00:01:32,160
So that's Star and that's all we have to do.

22
00:01:32,160 --> 00:01:35,640
Now we can use everything from Kintner in our program, so.

23
00:01:36,940 --> 00:01:41,920
In order to create counter programs, there's a couple of things we need to do, we need to create a

24
00:01:41,920 --> 00:01:48,180
counter instance and then we need to create a loop, a main loop and basically a loop does what it sounds.

25
00:01:48,190 --> 00:01:51,190
It loops around constantly, non-stop.

26
00:01:51,460 --> 00:01:55,970
And any time something changes when it loops, it sees that change.

27
00:01:56,230 --> 00:02:02,230
So if you move your mouse, your mouse across the screen, what's happening here is that loop is looping.

28
00:02:02,230 --> 00:02:07,810
And every time it loops, I mean, blazingly fast, like millisecond loops, you know, very fast,

29
00:02:07,930 --> 00:02:10,270
it says, OK, now the mouse is over a little bit.

30
00:02:10,280 --> 00:02:11,650
Now it's a little bit more.

31
00:02:11,650 --> 00:02:12,280
A little bit more.

32
00:02:12,400 --> 00:02:14,770
And that's how it keeps track of everything.

33
00:02:14,920 --> 00:02:19,180
You know, when you go to click a button, that loop is spinning and it says, oh, you've pressed a

34
00:02:19,180 --> 00:02:20,500
button and it loops again.

35
00:02:20,500 --> 00:02:24,280
Oh, you've left know you've removed the mouse from the button.

36
00:02:24,490 --> 00:02:27,330
Anything you do in a program, it's that loop that's spinning around.

37
00:02:27,340 --> 00:02:30,520
Now, we don't really care about that, but that's what's happening in the background.

38
00:02:30,520 --> 00:02:32,320
So we need to create that loop.

39
00:02:32,770 --> 00:02:35,530
And really, that's all there is to.

40
00:02:36,450 --> 00:02:42,000
Creating a counterprogram just for the framework of it, so like I said, first, we need to create

41
00:02:42,000 --> 00:02:42,660
an instance.

42
00:02:42,660 --> 00:02:45,300
So I'm going to call this instance root.

43
00:02:45,720 --> 00:02:48,450
You can call it anything you want, but root is sort of the customer.

44
00:02:48,510 --> 00:02:49,230
That's the root.

45
00:02:49,230 --> 00:02:51,630
It's the main instance that we're going to create.

46
00:02:51,840 --> 00:02:54,590
And this is a tea cake instance.

47
00:02:54,600 --> 00:02:59,030
It's uppercase T, lower lowercase K, and that's it.

48
00:02:59,250 --> 00:03:00,390
So that's our instance.

49
00:03:00,660 --> 00:03:02,750
And we'll see what we're going to do with that later on.

50
00:03:03,450 --> 00:03:07,350
Now we just need to create our loop and it's called a main loop.

51
00:03:07,560 --> 00:03:12,330
So it's a root dot main loop and then that's a function as well.

52
00:03:12,420 --> 00:03:15,210
And we usually keep this at the bottom of our program.

53
00:03:15,210 --> 00:03:17,630
So I usually put some space in there.

54
00:03:18,000 --> 00:03:21,650
And so now, strictly speaking, this is all we need to create Cantopop programs.

55
00:03:21,660 --> 00:03:27,510
Now, if we save this as hello DCPI and if we run this, I don't think much is going to happen.

56
00:03:27,520 --> 00:03:30,390
So make sure you're in your C GUI directory if you want to type.

57
00:03:30,750 --> 00:03:33,120
Now you see a there's that file we just created.

58
00:03:33,120 --> 00:03:33,830
So that's cool.

59
00:03:34,110 --> 00:03:39,840
Now to run files, to run any sort of python program, including counter programs, we just type in

60
00:03:39,840 --> 00:03:40,470
Python.

61
00:03:41,600 --> 00:03:47,660
And since we click that ad Python to towpath box when we installed it, we can run Python from anywhere

62
00:03:47,660 --> 00:03:51,320
on our computer, including in this directory, so then we just call the file.

63
00:03:51,320 --> 00:03:51,800
So hello.

64
00:03:52,070 --> 00:03:52,390
Hi.

65
00:03:53,150 --> 00:03:54,230
And when we do.

66
00:03:55,270 --> 00:03:59,740
Here's a little program that pops up now, there's not much going on here, right, but it's got a little

67
00:03:59,740 --> 00:04:03,700
icon at the top here, says T.K. has our, you know, minimize.

68
00:04:03,700 --> 00:04:04,480
Maximize.

69
00:04:04,480 --> 00:04:05,860
Oh, right.

70
00:04:07,360 --> 00:04:08,080
Minimize.

71
00:04:09,430 --> 00:04:15,160
And sort of exit button, and then when it stops running, boom, we get our terminal back.

72
00:04:15,160 --> 00:04:17,740
So that's our very first program.

73
00:04:17,750 --> 00:04:19,950
That's cool, but it's not that cool.

74
00:04:19,960 --> 00:04:24,850
So let's let's do at least let's at least add a title to this thing.

75
00:04:24,860 --> 00:04:32,050
So let's go root that title and then you can just type in anything you want to appear in the title screen.

76
00:04:32,050 --> 00:04:32,680
So let's go.

77
00:04:32,690 --> 00:04:34,360
Hello World.

78
00:04:34,570 --> 00:04:40,600
This is usually the first program that anybody writes as the Hello World Program.

79
00:04:40,600 --> 00:04:42,610
So we're going to print the title as Hello World.

80
00:04:42,790 --> 00:04:44,860
Now we can create the size of this app, too.

81
00:04:44,890 --> 00:04:45,760
We can go a route.

82
00:04:47,290 --> 00:04:48,180
Geometry.

83
00:04:49,930 --> 00:04:52,540
And then we can set this equal to any size we want.

84
00:04:52,570 --> 00:04:58,330
I'm just going to go four hundred by four hundred and we just put this in quotation marks and that's

85
00:04:58,330 --> 00:04:58,860
all there is to it.

86
00:04:58,870 --> 00:04:59,860
So go ahead and save this.

87
00:04:59,860 --> 00:05:04,720
Now, I'm hitting the control on the S button at the same time on my keyboard to save its command,

88
00:05:04,720 --> 00:05:10,090
as I think if you're on a Mac or you come up to file and just click save, if you'll notice it says

89
00:05:10,090 --> 00:05:16,180
on here to control s so you just hit the control key, hold it down and press the button at the same

90
00:05:16,180 --> 00:05:16,560
time.

91
00:05:16,900 --> 00:05:20,830
So either way, go ahead and save it and then just come back to our terminal here and I'm just going

92
00:05:20,830 --> 00:05:23,860
to click up on my arrow key to type in the last command.

93
00:05:23,860 --> 00:05:25,360
And there it is, Python Hualapai.

94
00:05:25,810 --> 00:05:30,400
If we run this, you'll notice that now it says Hello World up here at the top.

95
00:05:30,570 --> 00:05:31,270
Hey, that's cool.

96
00:05:31,450 --> 00:05:34,690
And if you remember, this box is now bigger than it was before.

97
00:05:34,690 --> 00:05:36,940
It's four hundred pixels by four hundred pixels.

98
00:05:37,240 --> 00:05:38,890
So it's a nice square box.

99
00:05:39,280 --> 00:05:40,390
So congratulations.

100
00:05:40,390 --> 00:05:45,490
You have created your very first Hello World Program with Kintore, your very first graphical user interface.

101
00:05:45,490 --> 00:05:47,320
And how easy was that?

102
00:05:47,590 --> 00:05:54,880
I mean, granted, this doesn't do much of anything, but it is a fully blown graphical user interface

103
00:05:54,880 --> 00:05:59,530
with Python using just, what, three, four lines of code.

104
00:05:59,530 --> 00:06:02,830
What we do, one, two, three, four, five lines of code.

105
00:06:03,370 --> 00:06:04,780
And we've got a program already.

106
00:06:04,780 --> 00:06:08,530
Now, obviously, we're going to want to make it look cooler than that and have it do things.

107
00:06:08,530 --> 00:06:13,420
But it really isn't that much harder than what we've just done already.

108
00:06:13,660 --> 00:06:15,130
And we'll see that going forward.

109
00:06:15,130 --> 00:06:18,790
So very cool and a lot of fun in the next video.

110
00:06:18,790 --> 00:06:20,440
I think we'll look at labels.
