def extract(self): with zipfile.ZipFile(self.zip_path, 'r') as zip_ref: zip_ref.extractall(self.extract_dir) return self.extract_dir
To give you the most useful answer, I’ll interpret your request in a few possible ways and provide solutions accordingly. (Windows) If you have a file named like canon_f15_1300_driver.zip : driver printer canon f 15 1300 zip
lpadmin -p CanonLBP1300 -E -v usb://dev/usb/lp0 -P /etc/cups/ppd/CanonLBP1300.ppd import os import zipfile import subprocess import platform class CanonDriverInstaller: def init (self, zip_path): self.zip_path = zip_path self.extract_dir = "./canon_driver_extracted" def extract(self): with zipfile
FILES:$PN += "/opt/canon $sysconfdir/cups/ppd" def extract(self): with zipfile.ZipFile(self.zip_path