๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ


Python

(75)
[Python] pyinstaller / exe ํŒŒ์ผ ์ƒ์„ฑ exe ํŒŒ์ผ ํ•˜๋‚˜๋กœ ์ƒ์„ฑ pyinstaller test.py --onefile https://flytrap.tistory.com/m/23 pyinstaller ์šฉ๋Ÿ‰ ์ค„์ด๋Š” ๋ฐฉ๋ฒ• (230MB->36MB) ํŒŒ์ด์ฌ์„ ์ด์šฉํ•˜์—ฌ ํ† ํ”Œ ์Šคํ”ผํ‚น ์—ฐ์Šต ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“ค์—ˆ๋Š”๋ฐ, ๋ณ„ ๊ธฐ๋Šฅ์ด ์—†๋Š”๋ฐ ์šฉ๋Ÿ‰์ด 230MB๋‚˜ ๋˜์—ˆ๋‹ค. ํ™•์ธํ•ด๋ณธ ๊ฒฐ๊ณผ ์•„๋‚˜์ฝ˜๋‹ค๋ฅผ ์ด์šฉํ•˜์—ฌ pyinstaller๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ƒ๊ธฐ๋Š” ๋ฌธ์ œ์˜€๊ณ , ์ˆœ์ • ํŒŒ์ด์ฌ flytrap.tistory.com
[Python] PySide6 import sys from PySide6.QtWidgets import QApplication, QWidget app = QApplication(sys.argv) window = QWidget() window.show() app.exec_() ์ฐธ๊ณ  https://martinii.fun/147 [1/?] ๊ฐœ๋ฐœํ™˜๊ฒฝ๊ณผ PySide6 ๋ชจ๋“ˆ ์„ค์น˜ ๋ณธ๋ฌธ์˜ GIF(์›€์งค)๋“ค์€ ํด๋ฆญํ•˜๊ธฐ ์ „์—๋Š” ์ดˆ๋ฐ˜1์ดˆ ์ •๋„๋งŒ ๋ฐ˜๋ณตํ•ด์„œ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ๋ณ„๋„๋กœ ํด๋ฆญ์„ ํ•ด์ฃผ์…”์•ผ๋งŒ ๋๊นŒ์ง€ ์žฌ์ƒ์ด ๋˜๋Š” ์  ์œ ์˜ํ•˜์—ฌ ์ฃผ์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. ๊ฐœ๋ฐœํ™˜๊ฒฝ๊ณผ ๋ชจ๋“ˆ ์„ค์น˜ ๊ฐœ๋ฐœํ™˜๊ฒฝ ์„ค์น˜ martinii.fun
[Python] ๊ฐ€์ƒํ™˜๊ฒฝ venv, pipenv ๋ช…๋ น์–ด ์ •๋ฆฌ venv python -m venv ๊ฐ€์ƒํ™˜๊ฒฝ์ด๋ฆ„ # ํ™˜๊ฒฝ๋ณ€์ˆ˜ path ์šฐ์„  ์ˆœ์œ„๊ฐ€ ๋†’์€ python ๋ฒ„์ „์œผ๋กœ ์ƒ์„ฑ python -m venv venv # path์™€ ์ƒ๊ด€์—†์ด ์„ค์น˜๋˜์–ด ์žˆ๋Š” ํŒŒ์ด์ฌ ์ค‘ ๋ฒ„์ „ ์ง€์ •ํ•˜์—ฌ ์ƒ์„ฑ py -3.8 -m venv venv # ํŒŒ์ด์ฌ์ด ์„ค์น˜๋œ ๊ฒฝ๋กœ ์ด์šฉํ•ด์„œ ์ƒ์„ฑ D:\Programs\Python\Python310\python -m venv venv ์„ค์น˜๋˜์–ด์žˆ๋Š” ํŒŒ์ด์ฌ ๋ณด๊ธฐ : py -0 ๊ฐ€์ƒํ™˜๊ฒฝ ํ™œ์„ฑํ™” venv\Scripts\activate ๋น„ํ™œ์„ฑํ™” deactivate ํŒจํ‚ค์ง€ ์ด๋ฆ„๊ณผ ๋ฒ„์ „ ์ถœ๋ ฅ pip list pip ์ผ๊ด„ ์„ค์น˜ pip install -r requirements.txt # ์‚ญ์ œ pip uninstall -r requirements.txt ํŒจํ‚ค์ง€ ๋ชฉ๋ก๊ณผ ๋ฒ„์ „ ..
[Python] Pillow ์ด๋ฏธ์ง€ ์‚ฌ์ด์ฆˆ ํ™•์ธ https://note.nkmk.me/en/python-opencv-pillow-image-size/ Get image size (width, height) with Python, OpenCV, Pillow (PIL) | note.nkmk.me This article describes how to get the image size (width, height) in Python with OpenCV and Pillow (PIL).The image size can be obtained as a tuple with the attribute shape of ndarray in OpenCV and the attribute size of PIL.Image in Pillow (PIL). Note that t note..
[Python] PDF ๊ด€๋ จ ํŒจํ‚ค์ง€ ์ •๋ฆฌ PDFRW https://github.com/pmaupin/pdfrw GitHub - pmaupin/pdfrw: pdfrw is a pure Python library that reads and writes PDFs pdfrw is a pure Python library that reads and writes PDFs - GitHub - pmaupin/pdfrw: pdfrw is a pure Python library that reads and writes PDFs github.com https://kimhwon.github.io/pdfrw-automation/ pdfrw๋ฅผ ์‚ฌ์šฉํ•œ PDF ์—…๋ฌด ์ž๋™ํ™” PDF ํผ์„ ์ฑ„์šฐ๋Š” ์—…๋ฌด๋ฅผ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค. ๋Œ€๋žต 600 rows ์ฏค ๋˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ๋ถ„๋ฅ˜ํ•ด์„œ PDF์— ์ฑ„์›Œ ๋„ฃ..
[Python] pip, pipenv install SSLError pip install ์‹œ SSLError ๋ฐœ์ƒ D:\>pip install pillow WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pillow/ WARNING: Retrying (Retry(total=3, connect=None, read=Non..
[Python] Pyppeteer window size ์กฐ์ ˆ browser = await launch(headless=False, ignoreHTTPSErrors=True, ignoreDefaultArgs=['--enable-automation'], args=['--window-size=800,600']) js ์‚ฌ์šฉํ•˜๊ธฐ await page.evaluate('(el) => el.value = ""', elem) await page.evaluate('(el) => el.click()', btn[0]) .getProperty๋กœ ์•ˆ๋  ๋•Œ evaluate ์ด์šฉํ•ด์„œ .getAttribute ์‚ฌ์šฉ li_elements = await page.querySelectorAll('.thmb') for ind, li in enumerate(li_element..
[Python] ํฌ๋กค๋ง Bookmarks https://pythondocs.net/selenium/%EC%85%80%EB%A0%88%EB%8B%88%EC%9B%80-%ED%81%AC%EB%A1%A4%EB%9F%AC-%EA%B8%B0%EB%B3%B8-%EC%82%AC%EC%9A%A9%EB%B2%95/ ์…€๋ ˆ๋‹ˆ์›€ ํฌ๋กค๋Ÿฌ ๊ธฐ๋ณธ ์‚ฌ์šฉ๋ฒ• - ๋ปฅ๋šซ๋ฆฌ๋Š” ํŒŒ์ด์ฌ ์ฝ”๋“œ ๋ชจ์Œ ์…€๋ ˆ๋‹ˆ์›€ ์ „๋ฐ˜์— ๊ด€ํ•˜์—ฌ ๊ฐ„๋žตํ•˜๊ฒŒ ์ •๋ฆฌํ•œ๋‹ค. ์ด ๋ฌธ์„œ๋Š” ์…€๋ ˆ๋‹ˆ์›€ ๋ฒ„์ „ 3 ๊ธฐ์ค€์ด๋‹ค. ์ตœ๊ทผ 4๋ฒ„์ „์ด ์ถœ์‹œ๋˜์—ˆ์œผ๋‚˜ ์‚ฌ์šฉ๋ฐฉ๋ฒ•์ด ์•ฝ๊ฐ„ ๋‹ค๋ฅด๋‹ˆ ์ด ๋ถ€๋ถ„์„ ํ™•์ธํ•˜๊ธธ ๋ฐ”๋ž€๋‹ค. ์‚ฌ์šฉ ๋ฐฉ๋ฒ•์ด๋‚˜ ์˜ˆ์‹œ๋Š” ๋”ฐ๋กœ pythondocs.net https://sjwiq200.tistory.com/11 [PYTHON] Selenium ์—์„œ ํ—ค๋” User-Agent ๊ฐ’ ์ˆ˜์ •ํ•˜๊ธฐ ์•ˆ๋…•ํ•˜์„ธ์š”!! ์˜ค๋Š˜์€ Python๊ณผ Seleni..