1
00:00:01,540 --> 00:00:02,260
Hi, welcome back.

2
00:00:02,469 --> 00:00:11,110
And this video, you learn how to access the copy text from within Python so you can process that text

3
00:00:11,110 --> 00:00:11,650
further.

4
00:00:12,340 --> 00:00:17,680
So for this, what I'm going to do is I'm going to get some codes from the keyboard that's profile.

5
00:00:18,190 --> 00:00:21,970
This is the code we developed during the previous video.

6
00:00:22,450 --> 00:00:26,860
So in this code, we get the position of the cursor.

7
00:00:27,160 --> 00:00:33,520
So let me get the position of this file sample doctor because I'm going to click on that sample via

8
00:00:33,520 --> 00:00:42,370
Python and then select all the codes via Python copy and then get that string that copied string inside

9
00:00:42,370 --> 00:00:43,090
Python.

10
00:00:44,050 --> 00:00:49,540
So first of all, I want to know what the position of this file is because I added the file now, so

11
00:00:49,540 --> 00:00:52,660
the position on the screen has changed to something else.

12
00:00:53,620 --> 00:01:00,670
So I want to place the cursor here and then press the keyboard shortcut to run the code without moving

13
00:01:00,670 --> 00:01:01,050
the cursor.

14
00:01:01,060 --> 00:01:10,640
But be careful if I press control or I'm applying charm on each me if I press control or that will execute

15
00:01:10,640 --> 00:01:11,590
the keyboard or tip.

16
00:01:11,620 --> 00:01:13,810
Why not clipboard that be white?

17
00:01:14,170 --> 00:01:21,340
So if you want to execute the current Python file, you want to see two, right click and see here.

18
00:01:21,340 --> 00:01:27,010
What's the shortcut to sort of control shift or so plays a cursor there.

19
00:01:27,610 --> 00:01:29,770
Control shift or.

20
00:01:31,970 --> 00:01:36,770
And these are the coordinates, so now I want to double click.

21
00:01:39,220 --> 00:01:40,720
Using the double click methods.

22
00:01:41,450 --> 00:01:45,640
So click over one hundred twenty six to thirty one.

23
00:01:48,390 --> 00:01:57,010
And then I want to use the Holtzclaw methods to select everything using commands, A. or control.

24
00:01:57,060 --> 00:01:58,590
So it's a C.

25
00:01:58,590 --> 00:02:02,970
R. L. A if you are on Windows, I'm on Mac, so I'm using commands.

26
00:02:02,970 --> 00:02:07,080
You duplicate that that should be should be C.

27
00:02:08,009 --> 00:02:13,410
And then so we have some similar codes in here.

28
00:02:13,950 --> 00:02:14,610
We copied.

29
00:02:14,610 --> 00:02:15,780
But then what can we do?

30
00:02:15,780 --> 00:02:21,150
Because if I run this file, no, that's copies.

31
00:02:21,150 --> 00:02:21,690
That's code.

32
00:02:21,690 --> 00:02:22,890
But now we have to access.

33
00:02:22,890 --> 00:02:24,150
It's within Python.

34
00:02:25,390 --> 00:02:32,230
And to access the clipboard text, you can use the paper clip.

35
00:02:34,820 --> 00:02:39,920
Standard Library, you don't have to install this, so all you have to do is.

36
00:02:42,250 --> 00:02:51,010
Access Viper clip, that's pastes that will return the copy text so you can so that in a valuable,

37
00:02:51,220 --> 00:02:52,030
let's say, text.

38
00:02:55,180 --> 00:03:03,430
And print out that text to see if we got access to that clipboard or not, some of our the codes.

39
00:03:05,650 --> 00:03:12,700
And yeah, here we see on the terminal that Python has returned the texts of this file.

40
00:03:18,340 --> 00:03:26,470
Since we are in Pie Alta Gooey, you can also use the pie all to gooey that alert.

41
00:03:29,070 --> 00:03:32,760
Methods to show the text on the screen.

42
00:03:34,400 --> 00:03:35,180
So, Ron, again.

43
00:03:36,200 --> 00:03:41,450
And that's the alert prompt, you see, the text is shown in here.

44
00:03:44,400 --> 00:03:48,450
So what you do with this tax offer worse with this variable, it's up to you.

45
00:03:48,690 --> 00:03:54,330
It depends on the scenario, but that is all you can copy and also get access to that.

46
00:03:54,930 --> 00:03:57,420
Clearly, both texts via Python.

47
00:03:57,570 --> 00:03:58,050
Thank you.

