본문 바로가기

Programming33

[Kotlin] 자료형, 진수 표현(리터럴 상수, Literal constants) https://kotlinlang.org/docs/reference/basic-types.html 자료형 숫자형 (Numbers) (Type / Size / Min value / Max value) Byte : 8bits / -128 ~ 127 Short : 16bits / -32,768 ~ 32,767 Int : 32bits / -2,147,483,648(-2^31) ~ 2,147,483,647(2^31 - 1) Long : 64bits / -9,223,372,036,854,775,808(-2^63) ~ 9,223,372,036,854,775,807(2^63 - 1) val pi = 3.14 // 소수값은 float형인지 Double형인지 명시하지 않을 경우 Double 값으로 선언된다. val e =.. 2020. 4. 25.
[Python] PyQt5 QListWidget()에 아이템 추가 self.Widget1 = QListWidget() self.leftlist.insertItem(0, 'name1') self.leftlist.insertItem(1, 'name2') self.leftlist.insertItem(2, 'name3') 2020. 4. 16.
[Python] 파이썬 절대 경로 / 사용자 이름 가져오기 format(os.getlogin()) 사용자 이름 가져오기 format(os.getlogin()) format(os.login) import os print(format(os.getlogin())) # C:\User\lucidyul\~~~~ # lucidyul 절대경로 설정 예 import os path = "C:/Users/{}/desktop".format(os.getlogin()) # {}부분에 사용자 이름 print(path) # C:/Users/lucidyul/desktop 2020. 2. 2.
[Python] pyinstaller 에러 RecursionError: maximum recursion depth exceeded pyinstaller을 사용해 exe로 변환할 때 발생하는 RecursionError: maximum recursion depth exceeded 1. pyinstaller 사용 2. maximum recursion depth exceeded 에러 발생 3. 생성된 spec 파일을 열고 4. 상단에 아래 코드 추가 import sys sys.setrecursionlimit(5000) 5. 터미널에서 파이썬 파일이 아닌 spec 파일로 pyinstaller 실행 6. build 폴더 안에 생성 완료 참고 https://stackoverflow.com/questions/38977929/pyinstaller-creating-exe-runtimeerror-maximum-recursion-depth-exceede.. 2020. 1. 31.
[Python] PyQt5 특정 리스트, 딕셔너리를 리스트 뷰에 표시 2020/01/10 - [Programming/Python] - [Python] PyQt5 List View에 아이템 추가하기 PyQt5 리스트, 딕셔너리를 리스트 뷰에 표시 day는 요일 구하는 함수 import datetime def day(self): t = ['월', '화', '수', '목', '금', '토', '일'] r = datetime.datetime.today().weekday() return t[r] monday, tuesday, ... 리스트 안에 아이템들이 있고 이 리스트들을 딕셔너리로 한번 더 묶음 monday = ['~', '~~'] tuesday = ['~', '~~'] wednesday = ['~', '~~'] thursday = ['~', '~~'] friday = ['~'.. 2020. 1. 31.
[Python] PyQt5 메시지 박스 / QMessageBox PyQt5 메시지 박스 / QMessageBox from PyQt5.QtWidgets import * def show_message_box(self, title, message): # title = 메시지 박스 타이틀, message = 메시지 박스 내용 msg_box = QMessageBox(self) msg_box.question(self, title, message, QMessageBox.Yes | QMessageBox.No) # Yes or No def box(self): self.show_message_box(title='title',message='message') def show_message_box(self, title, message): # title = 메시지 박스 타이틀, messag.. 2020. 1. 14.