본문 바로가기

Python15

[Study] Python, eval,lamda,map 공부하다가 몰라서 정리 1. eval(쉽게 이야기 하면 문자나 숫자로 구성된 문자를 파이션 표현식으로 바꾼다(산술식) 하지만 사용하기 매우 조심해야 한다. eval is a built-in function in Python that evaluates a string as a Python expression. The expression can be a simple value, such as a string or a number, or a more complex expression, such as an arithmetic expression. For example, the following code will evaluate the string "2 + 3" as a Python expression and p.. 2023. 2. 1.
#1 아무것도 모른 상태에서 처음 하는 Python GUI(PySide6) - 버튼 만들기 버튼 만들기 from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton import sys app = QApplication(sys.argv) window = QMainWindow() window.setWindowTitle("push button box") button = QPushButton() button.setText("Press me") window.setCentralWidget(button) window.show() app.exec() 결과 The QApplication class manages the GUI application’s control flow and main settings. The QMainWindow class p.. 2023. 1. 11.
#1 python pyside6 qt로 해보기(pyside6-uic.exe 없어서 고생함) pyside6-uic 찾아도 없어서 찾다가 고생고생 하다가 다른 사람도 고생하는 거 방지 하기위해 작성함 두가지 방법 있음 ui(qt designer 파일)을 이용하는 방법 나머지하나는 ui파일을 py로 변환해서 이용하는 방법이 있다. 순서(기본) python 설치(홈페이지) https://www.python.org/ vsc(visual studio code) 설치(홈페이지) https://code.visualstudio.com/ qt for python 설치(비주얼 스튜디오 코드 안에서) pyside6 설치 pip install PySide6 프로젝트 만들기 coding https://doc.qt.io/qtforpython/tutorials/basictutorial/widgets.html 참조 impo.. 2023. 1. 10.
Mini -Project #1 3자리 숫자 야구 게임 (Ver 1.0) python 숫자 야구 게임 python 인터넷이나 여러 블로그에서 기본은 거의 다 봤으나 project를 해보지 않고는 발전이 없어서 시작함 또는 그담에 뭐하지 고민하다가 쉽게 할 수 있는 프로젝트 하나씩 하기로 함(간단한 프로젝트 일주일에 하나씩) 처음이라 1시간이상 걸림 ㅠㅠ https://github.com/carcase2/Pyphon_Project_1 GitHub - carcase2/Pyphon_Project_1: 3자리 숫자 야구 게임임 3자리 숫자 야구 게임임. Contribute to carcase2/Pyphon_Project_1 development by creating an account on GitHub. github.com 계속 업데이트 할 예정 처음에 파이썬 아무것도 모르는 상태에.. 2023. 1. 6.