Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- vscode
- 명시적외래키
- ORM
- wifi안됨
- .net
- React
- 코드프로그래머스
- cpu불안들어옴
- 상속
- c#코딩의기술실전편
- 스냅잘찍음
- LINQ
- minimalAPI
- Store
- intellij
- EFCore
- a604mu
- extraParams
- mac
- Request
- ViewModel
- JSON
- Config
- lazy loading
- c#
- error
- dbContext
- extjs
- JavaScript
- scanner
Archives
- Today
- Total
ejyoo's 개발 노트
[Python] Jupyter Notebook 사용 본문
Python 에서 웹으로 Python 파일을 돌리고 싶을 때 사용하는 것이 Jupyter Notebook으로 알게되었다.
cmd에서 jupyter notebook을 실행해 본다.
// 실행할 Python 경로로 이동한 뒤 수행한다.
jupyter notebook
여기에서 Python 파일을 작성할 수 있다.
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow
from PyQt5 import uic
form_class = uic.loadUiType("./myqt01.ui")[0]
class WindowClass(QMainWindow, form_class):
def __init__(self):
super().__init__()
self.setupUi(self)
self.pb.clicked.connect(self.btnClick)
def btnClick(self):
print("버튼이 클릭되었습니다.")
self.lbl.setText("GootEvening")
if __name__ == "__main__":
app = QApplication(sys.argv)
myWindow = WindowClass()
myWindow.show()
app.exec_()
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>330</width>
<height>227</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QPushButton" name="pb">
<property name="geometry">
<rect>
<x>130</x>
<y>50</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Click</string>
</property>
</widget>
<widget class="QLabel" name="lbl">
<property name="geometry">
<rect>
<x>40</x>
<y>50</y>
<width>81</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>GootMorning</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>330</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>
예제파일이 있어서 위의 코드를 돌려보았다.
day16에가서 새로고침을 하면 Untitled.ipynb 가 생기는데 이것이 jupyter notebook을 돌린 파일이다.
dir하면 파일을 확인할 수 있다.
'BackEnd > Python' 카테고리의 다른 글
[OpenCV] openCV 설치 및 이미지 띄우기 예제 (0) | 2021.05.18 |
---|---|
DB 코드 조회해서 그래프 그리기 (0) | 2021.05.12 |
python 웹 크롤링을 사용한 데이터 추출하기 (0) | 2021.05.11 |
Python DB 연결 (0) | 2021.05.11 |
HeidiSQL 설치 및 DB 생성 (0) | 2021.05.11 |