Hide the console in Python Selenium
Running Python Selenium causes the ChromeDriver console …
Published:
This is a method of compressing a folder into a ZIP file (.zip) with Python.
It also describes how to unzip a ZIP file.
from shutil import make_archive
make_archive('data', 'zip', root_dir='./data')Use make_archive of shutil module.
'data' and the second argument is'zip', so the created file is data.zip.)In addition to zip, 'tar','gztar', 'bztar','xztar' can be used as the compression format.
from shutil import unpack_archive
unpack_archive('./data.zip', extract_dir='./unpacked_data', format='zip')Use unpack_archive of shutil module.
Python also has a module called zipfile that can handle files in ZIP format. If you want to use it in detail, I think you will use it.
If you just want to compress the folder (or decompress the file), I think the method introduced here is simple.
Running Python Selenium causes the ChromeDriver console …
PyInstaller makes it easy to create an exe, but I …
Replace strings in Excel cells with Python. It can be used …
Make a program created with Python & Selenium into an …
PyInstaller can be used to convert a program created with …
Describes how to convert an Excel sheet to PDF using Python. …