pyinstaller 실행파일 콘솔창 안뜨게하기
1. pyinstaller로 실행 파일 생성
2.생성된 *.spec 파일 수정
console=True, 를 console=False, 로 수정하고 저장합니다.
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='camfit',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
Webdriver 콘솔창 안뜨게하기
pyinstaller 실행파일 생성 후 spec 파일내용을 수정해도 Webdriver를 실행하게되면 콘솔창이 뜹니다.
service.py 파일을 수정하면 콘솔창을 안뜨게 할 수 있습니다.
1. service.py 파일 경로
"~\Site-packages\selenium\webdriver\common\service.py"
2. service.py 파일 수정
creationflags=self.creation_flags, 를 creationflags=0x08000000, 로 수정하고 저장합니다.
위 내용을 다수정하고 pyinstaller로 *.exe 파일을 다시 생성하면됩니다.
'python3 selenium' 카테고리의 다른 글
python3 selenium 동일한 요소 여러개 제어하기 (1) | 2023.11.18 |
---|---|
Python3 selenium click이 되지 않을 때 JavaScript를 사용하여 요소를 클릭, element_to_be_clickable, iframe, ActionChains (1) | 2023.11.18 |
python3 selenium ChromeDriver service, options (0) | 2023.11.17 |
캠핑장 예약 매크로, 캠핏 예약 매크로 (11) | 2023.09.13 |
python3 selenium 웹사이트 화면 스크롤 이동하기 (0) | 2023.06.09 |