From c48d64cbe00115700b7629a5fec875bc0a0e2633 Mon Sep 17 00:00:00 2001 From: hyugogirubato <65763543+hyugogirubato@users.noreply.github.com> Date: Sat, 4 Jan 2025 12:45:07 +0100 Subject: [PATCH] fix ctypes import for unix --- cbz/player.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cbz/player.py b/cbz/player.py index f965a64..4146530 100644 --- a/cbz/player.py +++ b/cbz/player.py @@ -4,9 +4,13 @@ import tkinter as tk from io import BytesIO from tkinter import ttk from tkinter.constants import DISABLED, NORMAL -from ctypes import windll from pathlib import Path +try: + from ctypes import windll +except ImportError: + windll = None # windll is not available on this platform + from PIL import Image, ImageTk from cbz.comic import ComicInfo