A Human In The Loop

The Python twain module has a shortcoming.  It’s summed up by this quote in the documentation; “The twain module can only be used in an application with a message loop”.  This is (as far as my limited research can find out) in the design of the whole TWAIN system on Windows; as image acquisition progresses, the calling application is notified of progress via a series of messages.

On Windows, that means you need a window, since messages are sent to windows.  Which means Windows has to be logged on, more or less  Now, maybe I’m just a tired old Unix hound who’s spent too much of his life writing daemon code that executes in the dark bowels of the machine where no human could be or would want to be, but I rather like systems that can automate stuff without assuming there’s someone sat in front of the damn box.  What if there’s been a powerfail and the system isn’t logged in?  Should all Windows servers require a human whose job is to scurry around them and check for rogue dialogue boxes?

No, of course not.  Yet it’s tedious and annoying that I can’t write my little Python script to make my camera take a picture every hour without messing in wxWindows.  Hey ho.

Oh, and if you don’t read the excellent Rupert Goodwin’s Diary on a Friday, you should.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s