Thats right.
You have to import the module into each DAT’s name space.
Otherwise it would be a real mess of conflicting names everywhere.
The sys.path.append only needs to be done once though (and before the imports).
Not to worry though, subsequent imports are fast, as the module is already sitting in memory,
and you’re just pointing an object to that shared instance internally.
So I’m trying to make some dynamic content for my little voice box. if my executeDAT looks like this- is this ideal in terms of non-redundant importing and execution?
I see what you mean about SAPI pausing the TD timeline. I learnt a lot on this thread/project, but I am weary of Win7’s weak TTS implementations. I think I will put it to bed/change my goals a bit. I’ll probably pick this thread up again in a yr or 2
Here’s my work for anyone going down the same rabbit hole. Thks again for all yer help, Rob. SuccessfulSpeaking01.39.toe (21.6 KB)
The first time I execute it doesn’t complain, but the next trigger gives that message. Looks like threads are piling up but not executing?
script:
[code]#
If rows or columns are deleted, sizeChange will be called instead of row/col/cellChange.
if not ‘win32com.client’ in sys.modules:
sys.path.append(“C:/Python33/Lib/site-packages/win32”)
sys.path.append(“C:/Python33/Lib/site-packages/win32/lib”)
sys.path.append(“C:/Python33/Lib/site-packages/Pythonwin”)