now, I found out that a the console user has also to be logged in
into the window server
to use WebKit methods also for the workstation version of MacOSX.
Haaaa! So, same behavior on both Server and Client versions of Mac
OS X.
Now, everything looks a bit more consistent. :-)
Of course this is not satisfying, because there is always an open
GUI-Session necessary with
the user which want to use the script on the command line.
The very first problem with the script is that is literally creates/
runs a Cocoa application, with its run loop and associated goodies;
that fact alone most often mandates a "GUI environment" (but this
clearly allows to easily harness the full power of WebKit, as
demonstrated by the script's conciseness).
The fact that one is running a python script is thus somewhat
misleading. In fact, it is a bit similar to launch Safari and take a
screenshot with the help of osascript from within a shell script;
nobody would wonder in case of failure outside of WindowServer...
Mebbe in OSX 10.6 we'll get virtual window servers to do things that
dont realy require access to the system window server... This would
also be awesome for doing Quicktime processing stuff etc in the
background.