View Single Post
Old 10-20-2020, 10:55 AM   #26
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,255
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by kovidgoyal View Post
Yes, exactly. I can wrap those same things inside the calibre winutil module so you can use them from there, instead.

Hmm, well that is unfortunate.
I've tidied up the existing win32 import statements and checked that the plugin still appears to be functioning OK on Win10 after the changes:
- calibre 64-bit v5.2
- calibre 32-bit v4.23.

I believe this is the full list of win32 imports:
Code:
from win32com.client import WithEvents
from win32com.client import Dispatch
from win32com.client import DispatchBaseClass
from win32com.client import CoClassBaseClass
from win32com.client import CLSIDToClass
from win32com.client import util as w32comclient_util

from win32com.server import util as w32comserver_util
from win32com.server.policy import EventHandlerPolicy

from win32process import CreateProcess
from win32process import STARTUPINFO

from win32event import WaitForSingleObject
from win32event import INFINITE

from win32con import STARTF_USESHOWWINDOW, SW_HIDE, CREATE_DEFAULT_ERROR_MODE
In case it's relevant, these 2 imports are also used in the '5000-line black box'. They're not ones I've ever knowingly used elsewhere in my other plugins.
Code:
import pythoncom
from pywintypes import IID
jackie_w is offline   Reply With Quote