파이썬[Python]: kivy - Clipboard 클래스
kivy.core.clipboard 모듈 - Clipboard 클래스(class)
/// 설명
클립보드(Clipboard)에 접근할 수 있는 클래스입니다.
참고: animation to gesture 모듈 목록
※ 형식
Clipboard
reference
https://kivy.org/doc/stable/api-kivy.core.clipboard.html
참고: animation to gesture 모듈 목록
※ 형식
Clipboard
reference
https://kivy.org/doc/stable/api-kivy.core.clipboard.html
/// 예제
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | import kivy kivy.require('2.0.0') from kivy.app import App from kivy.core.window import Window from kivy.core.clipboard import Clipboard from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button Window.clearcolor = (.6, 1, .8, 1) Window.size = (563, 1001) Window.top, Window.left = 30, 700 class FantasticApp(App): def _bt_press(self, bt_instance): bt_instance.text = Clipboard.paste() def build(self): Clipboard.copy('Clipboard') bl = BoxLayout(orientation='vertical') bt = Button(text='None', on_press=self._bt_press) bl.add_widget(bt) return bl FantasticApp().run() | cs |
/// 출력
* 실행환경: Microsoft Windows 10 Homes
* 인터프리터: 파이썬(Python 3.9)
– 당신을 응원합니다. –
댓글
댓글 쓰기