I’ve use pip to install pypiwin32 into my 64 bit python 3.3.5 install. This provides the ‘win32api’ module that I need to call to get info about monitors connected to the system.
If I run ‘python’ from the cmd prompt and do ‘import win32api’ it works and I can make my calls as expected.
python
Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:35:05) [MSC v.1600 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import win32api
However, in TD (61700), I’m getting a “ImportError: No module named win32api”.
python >>> import win32api
Traceback (most recent call last):
File “”, line 1, in
File “C:/Program Files/Derivative/TouchDesigner088/bin/TouchInit.py”, line 205, in tdcustomimport
r = previousimport(*args, **kw)
ImportError: No module named ‘win32api’
I’ve added ‘C:/Python33/Lib/site-packages’ to the Edit->Preferences->Python 64-bit module path. I can import other modules that I’ve installed without issue.
One thing that stands-out to me is that win32api is a file inside a ‘win32’ directory in the site-packages. Thus, the dirname does not match the module name. But, again, the commandline python interpreter doesn’t have any issue with this - it’s only when I try to import in Touch. This may be a red herring, though…
Other modules work, but win32api does not Is there some trick I’m missing here?
Thanks. Unfortunately, in v088 at the time I asked this, I do not think this was available and that was the only version available at the time when I needed to solve this problem. I will keep Monitors DAT in-mind for future use should the issue ever arise again.
I found a way to do this instead of configuring each computer’s output channels individually.
I still need to run this function outside of touchdesigner. If this information was exposed in the monitors DAT. or the library worked in touch, that would be amazing.