파이썬[Python]: 내장함수 - __doc__ 변수

내장함수 - __doc__ 변수(variable) /// 설명 패키지, 모듈, 클래스, 함수(메서드)에 관련된 정보를 표현합니다. A Variable in Python Standard ※ 형식 __doc__ reference https://docs.python.org/3/reference/datamodel.html /// 예제 1 print (__doc__)   # None cs /// 예제 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 import  array   # print(package_name.__doc__)  # try this   # document of a module print (array.__doc__) print ( '+='   *   40 )   # document of a method print (array.array.__doc__) print ( '+='   *   40 )   # document of a variable(?) print (array.typecodes.__doc__) print ( '+='   *   40 )   # it may be changed __doc__  =   '__doc__' print (__doc__)   # __doc__   array.__doc__  =   'changed' print (array.__doc__)   # changed   # array.array.__doc__ 'a'  # Error     Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: kivy - ActionButton 클래스 - kv

이미지
kivy.uix.actionbar 모듈 - ActionButton 클래스(class) /// 설명 ActionBar의 하위 위젯중 하나입니다. 버튼의 역활을 합니다. 참고: uix 모듈 목록 ※ 형식 ActionButton(**kwargs) reference https://kivy.org/doc/stable/api-kivy.uix.actionbar.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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 import  kivy   kivy.require( '2.0.0' )   from  kivy.app  import  App from  kivy.lang  import  Builder from  kivy.core.window  import  Window   Window.clearcolor  =  (. 5 , . 0 , . 5 , . 1 ) Window.size  =  ( 563 ,  1001 ) Window.top, Window.left  =   30 ,  800   kv  =   '' ' BoxLayout:     orientation: ' vertical '          ActionBar:         pos_hint: {' top ': 1}                  ActionView:             use_separator: True                          ActionPrevious:                 title: ' Action Bar '             ActionButton:                 text: ' Button '            

파이썬[Python]: kivy - AccordionItem 클래스 - kv

이미지
kivy.uix.accordion 모듈 - AccordionItem 클래스(class) /// 설명 Accordion과 연관된 클래스로 각 아이템을 형성합니다. 참고: uix 모듈 목록 ※ 형식 AccordionItem(**kwargs) reference https://kivy.org/doc/stable/api-kivy.uix.accordion.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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 import  kivy   kivy.require( '2.0.0' )   from  kivy.app  import  App from  kivy.lang  import  Builder   kv  =   '' ' Accordion:     orientation: ' vertical '          AccordionItem:         title: ' Title 0 '         Button:             text: ' Content 0 '             size_hint: (None, None)             size: (200, 200)     AccordionItem:         title: ' Title 1 '         Button:             text: ' Content 1 '             size_hint: (None, None)             size: (200, 200)     AccordionItem:         title: ' Title 2 '         Button:             text: 

파이썬[Python]: kivy - bind 함수 with Slider_0002 - kv

이미지
kivy.event 모듈 - EventDispatcher 클래스 - bind 함수(functions) /// 설명 이벤트 타입이나 속성을 callback 함수에 연결합니다. Event: on_touch_down(touch), on_touch_move(touch), on_touch_up(touch) Attribute: value 참고: event 모듈 목록 ※ 형식 bind(**kwargs) reference https://kivy.org/doc/stable/api-kivy.event.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 32 33 34 35 36 37 38 39 40 41 42 import  kivy   kivy.require( '2.0.0' )   from  kivy.app  import  App from  kivy.lang  import  Builder from  kivy.core.window  import  Window   Window.clearcolor  =  (. 5 , . 0 , . 5 , . 1 ) Window.size  =  ( 563 ,  1001 ) Window.top, Window.left  =   30 ,  800   kv  =   '' ' BoxLayout:     orientation: ' vertical '     Label:         id: id_lb         text: ' A '         font_size: ' 5dp '     Slider:          size_hint: (1, None)         height: 100         min: 1         max: 100         value: 1         on_touch_move: app.s

파이썬[Python]: 내장함수 - hex 함수

내장함수 - hex 함수(function) /// 설명 정수를 접두사 '0x'를 포함하는 16진수 형태로 변환하여 반환합니다. ※ 형식 hex() reference https://docs.python.org/3/library/functions.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 test_int  =   255 test_hex  =  hex(test_int) print (test_hex)   # 0xff   test_int  =   0b11111111 test_hex  =  hex(test_int) print (test_hex)   # 0xff   test_hex  =   '%#x'    # 0x print (test_hex % test_int)   # 0xff test_hex  =   '%x'     # lowercase print (test_hex % test_int)   # ff test_hex  =   '%X'     # uppercase print (test_hex % test_int)   # FF   test_hex  =   '{:#x}'    # 0x print (test_hex. format (test_int))   # 0xff test_hex  =   '{:x}'    # lowercase print (test_hex. format (test_int))   # ff test_hex  =   '{:X}'    # uppercase print (test_hex. format (test_int))   # FF   print (f '{test_int:#x}' )   # 0xff print (f '{test_int:x}' )   # ff print (f '{test_int:X}'