"can't draw to the construct window" -> Certainly you can! Here's what I had back in May '09:
That wasn't even with pressure sensitivity.
[quote:2mapg3b3]storing external python libraries is something no one has explained (or done at all?) yet.
It was not very difficult. What newt says about exporting the scripts to exe is correct - but only for scripts. If the scripts in question reference any other files, in my case a compiled .pyd file, you don't want to pack those in the same way as the scripts, because the bundled .py files are read from a zip within the Temp directory at runtime, and the scripts can't seem to reference the contents of that zip.
At first this had me confused, but as soon as I looked at what it was doing, everything made sense. The test app was functional within Construct, because it could read the libraries the scripts were using from various locations - Construct\Data\Python, where I'd placed them manually, but also from the Python26\Lib\etc directories. Of course, for distribution, you are not going to want to require that the user install Python and a special library just to run your program. So what I did was tossed the extra, non-.py libraries in the exe's directory.
It seems that simple!
I've only had one friend try it, though, so if anyone with a tablet wants to help - it's rather featureless, but - here is a 7z and a zip of the test application. They are identical. In reality, people without tablets should be able to test it as well. If it's all bundled correctly, it should not pop up any errors when loading the exe.
http://dl.dropbox.com/u/398143/Files/PressureTest.7z (1,324 KB)
http://dl.dropbox.com/u/398143/Files/PressureTest.zip (1,906 KB)
There is a boost_python-vc90-mt-1_39.dll in there that I don't think is actually being used. It seems to work fine without it at the moment. Wintab uses it for something, presumably - I have simply not accessed many features just yet. Also! Since I have it reading sensitivity, but not delivering any other actual information about the tablet to Construct, this is hardcoded to function properly with tablets that possess 1024 levels of pressure sensitivity alone. If tablets with different sensitivity levels exist, it will probably behave unusually.
If you are going to bundle libraries and such accessed by your python scripts in your own project, but aren't writing all your imported scripts from scratch (such as wintab, which communicates with tablet drivers), you may need to fiddle with the directory context of the various 'import' calls within the scripts. For example, wintab is stored within cgkit in Python, but I am using it outside of cgkit, and therefore simplified the file organization. I am not really sure how intuitive Python is when it comes to importing resources (where it will look, and how deep) but the error reporting in Construct proved invaluable for rooting out which scripts needed tweaking where.