View Single Post
Old 10-20-2020, 09:12 PM   #29
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,253
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@Kovid,

Is it safe to assume that for users of calibre version <= 4.23, the win32 modules will always be available?

If so, I believe I now have subprocess working OK in python3/calibrev5.2 with unicode args. In which case the last 5 rows can be removed from my original list

Code:
from win32com.client import WithEvents                                  #function
from win32com.client import Dispatch                                    #function
from win32com.client import DispatchBaseClass                           #class
from win32com.client import CoClassBaseClass                            #class
from win32com.client.CLSIDToClass import RegisterCLSIDsFromDict         #function
from win32com.client.util import Iterator as w32comclient_util_iterator #class

from win32com.server.util import wrap as w32comserver_util_wrap         #function
from win32com.server.policy import EventHandlerPolicy                   #class

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
ETA: All imports are now either a class or a function (rather than its module).
The attached updated plugin still seems to work OK in v4.23 and v5.2

Last edited by jackie_w; 10-25-2020 at 06:40 PM. Reason: zip removed, no longer relevant
jackie_w is offline   Reply With Quote