손잡기금지
close
프로필 배경
프로필 로고

손잡기금지

  • 분류 전체보기 (355)
    • CODE-ing (206)
    • IT관련정보 (55)
    • MS365.VBA.officeAddin (63)
    • 일상기록.취미생활 (28)
  • HOME
  • CODE-ing
  • IT관련정보
  • MS365.VBA.officeAddin
  • 글쓰기
python:: howto  tkinter _ listbox

python:: howto tkinter _ listbox

https://www.youtube.com/watch?v=wEv3BworNK8&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV&index=61 _

  • format_list_bulleted CODE-ing
  • · 2023. 8. 2.
  • textsms
python:: howto tkinter _ .config()

python:: howto tkinter _ .config()

tkinter를 잘 쓰려면, .config()를 잘써야 하는데 이걸 다루는 예제가 인터넷에 별로 없음 더구나 "이쁜" 앱을 만들려고 import ttkbootstrap 을 사용해서 만들게 되면 분명히 doc에는 사용법이 같아 보이는데, .config(bg="blue") 이런 명령어가 잘 안 먹음. https://www.youtube.com/watch?v=tqKyMDqp-3E&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV&index=64 ttkbootstrap을 결국에는 쓰게 될텐데.... 이게 tkinter from ttk와 호환이 되지만 약간씩 다른 부분이 있어서, 결국에는 ttk(original tkinter)를 잘 알아야 하긴 함. 그리고 예제가 ttk 밖에 없음 https..

  • format_list_bulleted CODE-ing
  • · 2023. 8. 2.
  • textsms
python:: tkinter entry input validation check

python:: tkinter entry input validation check

입력 값을 type에 맞지 않게 들어오게 되면 error처리를 해야 하는데, 사용자는 type 개념이 없기에 아무 것이나 입력하게 됨 int형 숫자만 받아야 하는데 텍스트 string이 들어오게 되면, 처리되도록 try ... except ValueError로 처리해야 함 try: number = int(my_box.get()) function(number) print("정상실행") except ValueError: print("오류발생") https://www.youtube.com/watch?v=IbpInH4q4Sg&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV&index=68

  • format_list_bulleted CODE-ing
  • · 2023. 8. 2.
  • textsms
python:: tkinter _ widget의 .pack을 다른 줄에서!!

python:: tkinter _ widget의 .pack을 다른 줄에서!!

Entry.pack() Button.pack() Label.pack() tkinter를 사용하다보면 .pack() 명령어를 가장 많이 사용하지 싶다. 그런데 예제들을 보면, widget과 동일한 줄에 .pack()을 붙이는 것도 있고 대부분은 그 다음줄에서 .pack()을 쓰곤 하는데... 줄을 바꾸기가 싫어서 가끔 같은 줄에 쓰기도 했었는데, "그러지 말아야! 하는 이유"를 명확히 설명해 주는 동영상 발견 >> pack()하고 바로 binding되어 버리면, 나중에 event로 .config()로 변경하려 해도 바뀌지가 않음. 그렇기 때문에 .pack()은 귀찮아도 다른 줄에 해야 한다 아래 그림에서 (B)처럼 써야 함. https://www.youtube.com/watch?v=5_VNqv-uH6o&l..

  • format_list_bulleted CODE-ing
  • · 2023. 8. 2.
  • textsms
python:: string format 변수처리

python:: string format 변수처리

-os.system( 프로그램명 )으로 실행하면 python 외부 프로그램을 실행시킴 -이 때 프로그램명에 공백이 있으면, 인식을 제대로 안해서 변수명을 "string" 으로 넣어주어야 함. -간편해서 f-string만 매번 쓰다보니, 영상이나 예전 code 스타일로 구현된 %s 가 눈에 잘 안 들어옴 *결국 잘 가져와서 쓰려고 해도, 다 이해하고 써야 하는구나... import os my_program = "notepad.exe" #각기 다른 3가지 방법 : 모두 실행됨 os.system('"%s"' % my_program) os.system('{0}'.format(my_program)) os.system(f'{my_program}') % 서식문자 %s :: String %d :: Integer %f ..

  • format_list_bulleted CODE-ing
  • · 2023. 8. 2.
  • textsms
python:: howto apply Thread() at command _ tkinter

python:: howto apply Thread() at command _ tkinter

이전에는 Thread.start()를 적용하려고 별도로 Function()을 구현했는데, command에서 바로 Thread처리하는 것이 더 간편함 ** 그럼 command에서 변수 사용할 때 lambda 함수 사용해야 하니, lambda && thread 같이 사용하는 것도 테스트를 해봐야 하나... # example1 import tkinter from ttk import time def myFunction(): time.sleep(5) #5초간 멈춤 btn1 = ttk.Button(root, text="Button1", command=myFunction) # using Thread btn2 = ttk.Button(root, text="Button2", command=Threading.Thread(t..

  • format_list_bulleted CODE-ing
  • · 2023. 8. 2.
  • textsms
  • navigate_before
  • 1
  • ···
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • ···
  • 35
  • navigate_next
전체 카테고리
  • 분류 전체보기 (355)
    • CODE-ing (206)
    • IT관련정보 (55)
    • MS365.VBA.officeAddin (63)
    • 일상기록.취미생활 (28)
최근 댓글
전체 방문자
오늘
어제
전체
Skin Designed by 쭈미로운 생활 - JJuum

티스토리툴바