View Single Post
Old 06-14-2018, 09:27 AM   #6
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Well, I didn't get stuck after all, everything appears to be working OK However there were a few things I didn't fully understand. Perhaps you could enlighten me?
  1. ParallelJob. This class has an argument called 'description'. What is this? I took a guess that it was an alphanumeric string that needed to be unique across all the individual queued jobs.
  2. The argument 'timeout' in the method which does the actual work for each job. I have a method:
    Code:
    def process_file(log, abort, myarg1, myarg2, timeout=30, in_process=True):
    What exactly is this timeout and how do you decide on a suitable value?
  3. The .py file for the Microsoft Speech library I copied unchanged from an old TTS plugin for the calibre Viewer. It seems to be working OK as-is in my plugin. I'm not asking you to verify all 5000+ lines of it but please would you look at this short extract from the top of the file:
    Spoiler:
    Code:
    # -*- coding: mbcs -*-
    # Created by makepy.py version 0.5.01
    # By python version 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)]
    # From type library 'sapi.dll'
    # On Sun Apr  3 15:49:07 2016
    'Microsoft Speech Object Library'
    makepy_version = '0.5.01'
    python_version = 0x30401f0
    
    import win32com.client.CLSIDToClass, pythoncom, pywintypes
    import win32com.client.util
    from pywintypes import IID
    from win32com.client import Dispatch
    
    # The following 3 lines may need tweaking for the particular server
    # Candidates are pythoncom.Missing, .Empty and .ArgNotFound
    defaultNamedOptArg=pythoncom.Empty
    defaultNamedNotOptArg=pythoncom.Empty
    defaultUnnamedArg=pythoncom.Empty
    
    CLSID = IID('{C866CA3A-32F7-11D2-9602-00C04F8EE628}')
    MajorVersion = 5
    MinorVersion = 4
    LibraryFlags = 8
    LCID = 0x0

    There are a couple of references to Python 3 in there. I don't think these can be important because this library appears to work OK on my own PC which does not have any copy of Python 3. Is there anything there which rings any alarm bells? I've also attached the whole library file in case it's necessary.
Attached Files
File Type: txt tts_typelib.py.txt (303.4 KB, 376 views)
jackie_w is offline   Reply With Quote