파이썬[Python]: datetime - timetz 메서드

datetime 모듈 - datetime 클래스 - timetz 메서드(method) /// 설명 '시:분:초.마이크로초+타임존'를 반환합니다. ※ 형식 datetime.timetz() reference https://docs.python.org/3/library/datetime.html#module-datetime /// 예제 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import  datetime   year  =  datetime.datetime.now().year month  =  datetime.datetime.now().month day  =  datetime.datetime.now().day hour  =  datetime.datetime.now().hour minute  =  datetime.datetime.now().minute second  =  datetime.datetime.now().second microsecond  =  datetime.datetime.now().microsecond   test_timezone  =  datetime.timezone(datetime.timedelta(hours = 9 ),  'KST' )   test_dt  =  datetime.datetime(year = year, month = month, day = day, hour = hour, minute = minute,                             second = second, microsecond = microsecond, tzinfo = test_timezone, fold = 0 )   print (test_dt.timetz())   # 09:41:30.945714+09:00 Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9)

파이썬[Python]: kivy, OpenGL ES - 사각형 그리기

이미지
kivy.graphics 모듈 - OpenGL ES /// 설명 사각형을 그립니다. 참고: OpenGL ES 모듈 목록 reference https://www.youtube.com/playlist?list=PL1P11yPQAo7qEnF_EysHOBUfF0AzUz3jh /// 예제 main.py 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 import  kivy   kivy.require( '2.0.0' )   from  kivy.app  import  App from  kivy.core.window  import  Window from  kivy.resources  import  resource_find from  kivy.graphics  import   * from  kivy.uix.widget  import  Widget   Window.clearcolor  =  ( 1 ,  1 ,  1 ,  1 ) Window.size  =  ( 563 ,  1001 ) Window.top, Window.left  =   30 ,  2900   #           positions         colors vertices  =  [ - 0. 5 ,  - 0. 5 ,  0. 0 ,   1. 0 ,  0. 0 ,  0. 0 ,               0. 5 ,  - 0. 5 ,  0. 0 ,   0. 0 ,  1. 0 ,  0. 0 ,               0. 5 ,   0. 5 ,  0. 0 ,   0. 0 ,  0. 0 ,  1. 0 ,              - 0. 5 ,   0. 5 ,  0. 0 ,   1. 0 ,  1. 0 ,  1. 0 ]   indices  =  [ 0 ,  1 ,  2 ,            

파이썬[Python]: datetime - time 메서드

datetime 모듈 - datetime 클래스 - time 메서드(method) /// 설명 '시:분:초.마이크로초'를 반환합니다. ※ 형식 datetime.time() reference https://docs.python.org/3/library/datetime.html#module-datetime /// 예제 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 import  datetime   year  =  datetime.datetime.now().year month  =  datetime.datetime.now().month day  =  datetime.datetime.now().day hour  =  datetime.datetime.now().hour minute  =  datetime.datetime.now().minute second  =  datetime.datetime.now().second microsecond  =  datetime.datetime.now().microsecond   test_dt  =  datetime.datetime(year = year, month = month, day = day, hour = hour, minute = minute,                             second = second, microsecond = microsecond, tzinfo = None , fold = 0 )   print (test_dt.time())   # 16:41:40.720768   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: keyword - iskeyword 메서드

keyword 모듈 - iskeyword 메서드(method) /// 설명 파이썬 키워드이면 True 를 반환합니다. ※ 형식 keyword.iskeyword(s) reference https://docs.python.org/3/library/keyword.html#module-keyword /// 예제 1 2 3 4 5 6 7 8 9 10 11 12 import  keyword   print (keyword.iskeyword( 'False' ))   # True print (keyword.iskeyword( 'None' ))   # True print (keyword.iskeyword( 'True' ))   # True print (keyword.iskeyword( 'and' ))   # True print (keyword.iskeyword( 'as' ))   # True print (keyword.iskeyword( 'assert' ))   # True print (keyword.iskeyword( 'async' ))   # True print (keyword.iskeyword( 'await' ))   # True print (keyword.iskeyword( '_' ))   # False   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: kivy, OpenGL ES - 삼각형 그리기

이미지
kivy.graphics 모듈 - OpenGL ES /// 설명 삼각형을 그립니다. 참고: OpenGL ES 모듈 목록 reference https://www.youtube.com/playlist?list=PL1P11yPQAo7qEnF_EysHOBUfF0AzUz3jh /// 예제 main.py 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 import  kivy   kivy.require( '2.0.0' )   from  kivy.app  import  App from  kivy.core.window  import  Window from  kivy.resources  import  resource_find from  kivy.graphics  import   * from  kivy.uix.widget  import  Widget   Window.clearcolor  =  ( 1 ,  1 ,  1 ,  1 ) Window.size  =  ( 563 ,  1001 ) Window.top, Window.left  =   30 ,  2900   #           positions        colors vertices  =  [ - 0. 5 ,  - 0. 5 ,  0. 0 ,  1. 0 ,  0. 0 ,  0. 0 ,               0. 5 ,  - 0. 5 ,  0. 0 ,  0. 0 ,  1. 0 ,  0. 0 ,               0. 0 ,   0. 5 ,  0. 0 ,  0. 0 ,  0. 0 ,  1. 0 ]   indices  =  [ 0 ,  1 ,  2 ]   fmt  =  [(b 'pos' ,  3 ,  'float' ),        (b 'color' ,  3